[PHP] Time zones are spinning my brain

2011-06-29 Thread Brian Dunning
Help. I'm using PayPal's API to get a report of all the yesterday's transactions. I'm in California, and I define yesterday as California's yesterday, midnight to midnight. PayPal wants the STARTDATE and ENDDATE provided in UTC/GMT. I'm building and testing my report using this: $start =

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Richard Quadling
On 29 June 2011 17:09, Brian Dunning br...@briandunning.com wrote: Help. I'm using PayPal's API to get a report of all the yesterday's transactions. I'm in California, and I define yesterday as California's yesterday, midnight to midnight. PayPal wants the STARTDATE and ENDDATE provided in

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Geoff Shang
On Wed, 29 Jun 2011, Brian Dunning wrote: $start = gmdate('Y-m-d\TH:i:s.00\Z', strtotime(yesterday 00:00:00)); $end = gmdate('Y-m-d\TH:i:s.00\Z', strtotime(yesterday 23:59:59)); I think this is right, since it's 7 hours off California time, but I just need someone to double check my spinning

Re: Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Tim Streater
On 29 Jun 2011 at 17:25, Richard Quadling rquadl...@gmail.com wrote: And UTC is not the same as GMT. Ish. Yes it is. GMT is only valid for 6 months of the year. Then, due to DST, it becomes BST. No, the UK is on GMT for 5 months a year and then on BST (GMT+1) for 7 months. -- Cheers --

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Geoff Shang
On Wed, 29 Jun 2011, Richard Quadling wrote: And UTC is not the same as GMT. Ish. GMT is only valid for 6 months of the year. Then, due to DST, it becomes BST. UTC is just UTC. This is incorrect. For all practical purposes, GMT and UTC are the same. The fact that the time in Greenwich is

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Brian Dunning
Thanks everyone. It seems to be working correctly. You gave me some extra peace of mind. I did set the date_default_timezone_set('America/Los_Angeles') but it looks like that was in the defaults anyway. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Geoff Shang
On Wed, 29 Jun 2011, Brian Dunning wrote: Thanks everyone. It seems to be working correctly. You gave me some extra peace of mind. I did set the date_default_timezone_set('America/Los_Angeles') but it looks like that was in the defaults anyway. :-) It probably is if this is where your site