Re: dst and strtotime

From: Date: Tue, 13 Mar 2007 17:08:12 +0000
Subject: Re: dst and strtotime
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-250469@lists.php.net to get a copy of this message
On Tue, 2007-03-13 at 17:58 +0100, Tijnema ! wrote:
On 3/13/07, Robert Cummings <robert@interjinn.com> wrote:
On Tue, 2007-03-13 at 17:50 +0100, Tijnema ! wrote:
On 3/13/07, Robert Cummings <robert@interjinn.com> wrote:
On Tue, 2007-03-13 at 12:31 -0400, Jake McHenry wrote:
-----Original Message----- From: Jake McHenry [mailto:linux@nittanytravel.com] Sent: Tuesday, March 13, 2007 11:22 AM To: For users of Fedora; PHP-General Subject: Re: [PHP] dst and strtotime A little more info:
strtotime("last monday")      or yesterday, is correct, but
strtotime("last sunday") gives me 3/10 (saturday), strtotime("last saturday") gives me 3/9 (Friday), "last friday" gives me 3/8 thursday...... etc. maybe it will go away after a week??????
What is the output of the below? echo date("Y-m-d g:i A T", time()); echo date("Y-m-d g:i A T", strtotime("last sunday"));
2007-03-13 12:30 PM EDT 2007-03-10 11:00 PM EST
Funny stuff... I get the same under Ubuntu 6.10 with php 4.4.4 (manual build). Cheers, Rob.
I live in The Netherlands, using CET, and the output is fine. 2007-03-13 5:49 PM CET 2007-03-11 12:00 AM CET So the EDT/EST must cause the problem.
I have my doubts that incorrect output is the cause. It's more likely the result. I'm ion the process of building PHP 4.4.6 to see if it has the same problem. Cheers, Rob.
It is not a PHP problem, i just checked it on a server running PHP4.4.4 in GMT timezone, output: 2007-03-13 4:55 PM GMT 2007-03-11 12:00 AM GMT All working fine.
Well that's strange since PHP4 and 5 both use the same ini file on my dev box. And so they both get the following ini setting: date.timezone="Canada/Eastern" And in php 4.4.4 I get the bad output, but in php 5.2.0 I get the good output. Cheers, Rob.
Why would one give me EST and the other EDT? +60*60 worked after strtotime for a temp fix, but I'm probably going to do the update to php5 finally....hopefully it doesn't break anything I've created... like i need more work to do.. lol thanks for all the help :) Jake

« previous php.general (#250469) next »