Re: Date +30 comparison

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

 



On Tue, Sep 01, 2009 at 02:47:43PM -0400, Andrew Ballard wrote:

> On Tue, Sep 1, 2009 at 1:27 PM, tedd<tedd.sperling@xxxxxxxxx> wrote:
> > First get the date to seconds, like so:
> >
> > $today_date = '8/26/2009';
> >
> > $next_date = strtotime($today_date) + (86400 * 30);
> >
> 
> No. Due to Daylight Saving Time, many time zones have two days each
> year when the number of seconds in a day is not 86400.

This and the "2038" bug are reasons to do this type of calculation with
Julian days, as opposed to seconds.

Paul

-- 
Paul M. Foster

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