RE: [PHP] Date +30 comparison
| From: | Ford, Mike | Date: | Wed, 02 Sep 2009 15:06:12 +0000 |
| Subject: | RE: [PHP] Date +30 comparison | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297605@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: tedd [mailto:tedd.sperling@gmail.com]
> Sent: 01 September 2009 21:52
>
> At 2:47 PM -0400 9/1/09, Andrew Ballard wrote:
> >On Tue, Sep 1, 2009 at 1:27 PM, tedd<tedd.sperling@gmail.com>
> 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.
> >
>
> Arrggg.
>
> But good to know.
And if you absolutely insist on doing it this way, make sure you start in the middle of the day --
if your base time is 12:00 noon (which is what I always use in this situation), the furthest it can
go because of DST is 11:00 or 13:00, which won't screw you up if all you're interested in
is the date.. ;)
Cheers!
Mike
--
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm