Re: [PHP] strtotime time zone trouble

2005-01-18 Thread Tom
Marcus Bointon wrote: How is this not a bug? ?php print date('Y-m-d H:i:s', strtotime('now UTC')).\n; print date('Y-m-d H:i:s', strtotime('now PST')).\n; ? outputs: 2005-01-18 09:58:09 (correct) 2005-01-18 17:58:09 (incorrect) PST = UTC - 8, therefore if you ask for strtotime in PST it will give

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread Marcus Bointon
On 18 Jan 2005, at 10:53, Tom wrote: PST = UTC - 8, therefore if you ask for strtotime in PST it will give you now + 8. This is standard in most languages, you are just reading the functionality back to front. ie when you say strtotome('now PST'), what you are asking for is the current local

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread Tom
Marcus Bointon wrote: On 18 Jan 2005, at 10:53, Tom wrote: PST = UTC - 8, therefore if you ask for strtotime in PST it will give you now + 8. This is standard in most languages, you are just reading the functionality back to front. ie when you say strtotome('now PST'), what you are asking for

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread M. Sokolewicz
Marcus Bointon wrote: On 18 Jan 2005, at 10:53, Tom wrote: PST = UTC - 8, therefore if you ask for strtotime in PST it will give you now + 8. This is standard in most languages, you are just reading the functionality back to front. ie when you say strtotome('now PST'), what you are asking for

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread M. Sokolewicz
Tom wrote: Marcus Bointon wrote: On 18 Jan 2005, at 10:53, Tom wrote: PST = UTC - 8, therefore if you ask for strtotime in PST it will give you now + 8. This is standard in most languages, you are just reading the functionality back to front. ie when you say strtotome('now PST'), what you are

RE: [PHP] strtotime time zone trouble

2005-01-18 Thread Michael Sims
Marcus Bointon wrote: Much of the point of using zone names rather than fixed numeric offsets is that it allows for correct daylight savings calculations (assuming that locale data is correct on the server). Let me rephrase the question - how can I get the current time in a named time zone