Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6951169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:11:08+00:00 2026-05-27T14:11:08+00:00

I’m setting up an application using Paypal Adaptive Payments. I’m currently implementing the call

  • 0

I’m setting up an application using Paypal Adaptive Payments.

I’m currently implementing the call to the Preapproval, and the specification says the StartDate can not be before today.

With that in mind… under which timezone are they validating this against?

The API SDK has this in the example:

$currDate = getdate();
$startDate = $currDate['year'].'-'.$currDate['mon'].'-'.$currDate['mday'];
$startDate = strtotime($startDate);
$startDate = date('Y-m-d', mktime(0,0,0,date('m',$startDate),date('d',$startDate),date('Y',$startDate)));
$endDate = add_date($startDate, 1);

However that date can be different based on the timezone of the server sending the request.

Anyone have any ideas on how to ensure no issues will occur?

Edit w/ Bounty:

As of December 15th, we have now run into this as an error. We are using UTC time, and once it turns a new day in UTC, payments start getting failures.

I am using the above code in the following place:

$preapprovalRequest->startingDate = $startDate;
$preapprovalRequest->endingDate = $endDate;

What do I need to make this work?

Edit 2:

Yes timezone is setup as UTC, we did this intentionally so that all time information in our database is stored without timezone.

Essentially I’m trying to figure out how to specify that the date I’m sending to Paypal is in UTC, not whatever timezone they happen to be in.

Edit 3:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APPreapproval

There is the API, and it says the following

The startingDate and endingDate can be in eiter Zulu or GMT offset
formats. as in the following respective examples:
2010-09-10Z
2010-09-10T17:24:03.874-07:00

Essentially I need the above code, to output something like that specifying I’m using UTC…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:11:08+00:00Added an answer on May 27, 2026 at 2:11 pm

    PHP time functions are based on system time (http://us.php.net/manual/en/intro.datetime.php). Are you sure your system is setup to use UTC time? You can check with the following:

    mpurcell@service1 ~/projects/config $ -> date
    Thu Dec 15 23:29:09 UTC 2011
    

    Notice the UTC in the response. If your system is setup to some other timezone, then that may be your problem, if you need to set your timezone to UTC, try:

    $ rm -f /etc/localtime
    $ ln -s /usr/share/zoneinfo/UTC /etc/localtime
    

    Also be sure that your system time is corrected using Network Time Protocol:

    $ ntpdate -b pool.ntp.org
    

    — Edit —

    Based on your edits, looks like they are expecting the time in either Zulu (append Z) or GMT with offset (more complex), try this:

    $preapprovalRequest->startingDate = $startDate . 'Z';
    $preapprovalRequest->endingDate = $endDate . 'Z';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.