Re: dst and strtotime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



does return the time() command the right date for you?

Tijnema


On 3/13/07, Jake McHenry <linux@xxxxxxxxxxxxxxxxx> wrote:

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??????


> anyone else have anything to add?
>
> thanks,
> Jake
>
>
>>
>>
>>> On 3/12/07, Jake McHenry <linux@xxxxxxxxxxxxxxxxx> wrote:
>>>>
>>>> Anyone know of anything I can check? I've been trying different
things
>>>> all
>>>> afternoon and I'm still getting the wrong date from strtotime. date()
>>>> works
>>>> fine.
>>>>
>>>> Thanks,
>>>> Jake
>>>>
>>>> ----- Original Message -----
>>>> From: "Jake McHenry" <linux@xxxxxxxxxxxxxxxxx>
>>>> To: "PHP-General" <php-general@xxxxxxxxxxxxx>
>>>> Sent: Monday, March 12, 2007 12:26 PM
>>>> Subject: Re:  dst and strtotime
>>>>
>>>>
>>>> > yepper
>>>> >
>>>> > date
>>>> > Mon Mar 12 12:25:33 EDT 2007
>>>
>>>
>>> Is this from PHP or from bash?
>>> Sometimes those differ...
>>
>>
>>
>> 2007-03-12 17:34:22
>> 2007-03-12 17:34:22
>>
>>
>> <?php
>> echo `date "+%Y-%m-%d %H:%M:%S"`;
>> echo date("Y-m-d H:i:s");
>> ?>
>>
>>
>>
>>>
>>> Tijnema
>>>
>>>>
>>>> >
>>>> > ----- Original Message -----
>>>> > From: "Peter Lauri" <lists@xxxxxxxxxxx>
>>>> > To: "'Jake McHenry'" <linux@xxxxxxxxxxxxxxxxx>; "'PHP-General'"
>>>> > <php-general@xxxxxxxxxxxxx>
>>>> > Sent: Monday, March 12, 2007 5:23 PM
>>>> > Subject: RE:  dst and strtotime
>>>> >
>>>> >
>>>> >> Is your system time correct?
>>>> >>
>>>> >> Best regards,
>>>> >> Peter Lauri
>>>> >>
>>>> >> www.dwsasia.com - company web site
>>>> >> www.lauri.se - personal web site
>>>> >> www.carbonfree.org.uk - become Carbon Free
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>> -----Original Message-----
>>>> >>> From: Jake McHenry [mailto:linux@xxxxxxxxxxxxxxxxx]
>>>> >>> Sent: Monday, March 12, 2007 6:10 PM
>>>> >>> To: PHP-General
>>>> >>> Subject:  dst and strtotime
>>>> >>>
>>>> >>> Hi everyone,
>>>> >>>
>>>> >>> I was hoping a problem like this wouldn't arise, but it happened
:(
>>>> >>>
>>>> >>> After the dst updates on my fedora box, this broke, and worked
fine
>>>> >>> before..
>>>> >>> now gives me 3/10 instead of 3/11 for strtotime("last
sunday")....
>>>> >>> anyone
>>>> >>> know why? 3/10 was saturday!
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> $recent_period = strtotime('last sunday');
>>>> >>> echo date("Y-m-d", $recent_period);
>>>> >>> print_r($periods);
>>>> >>> $test_recent_period = array_search($recent_period, $periods);
>>>> >>> if ($test_recent_period == '')
>>>> >>>   $recent_period = strtotime('last sunday', $recent_period);
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> Thanks,
>>>> >>> Jake
>>>> >>>
>>>> >>> --
>>>> >>> PHP General Mailing List (http://www.php.net/)
>>>> >>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>> >>
>>>> >
>>>> > --
>>>> > PHP General Mailing List (http://www.php.net/)
>>>> > To unsubscribe, visit: http://www.php.net/unsub.php
>>>> >
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux