RE: [PHP] php's 27/10/2002 problem Important
| From: | Ford, Mike [LSS] | Date: | Mon, 16 Sep 2002 17:34:39 +0000 |
| Subject: | RE: [PHP] php's 27/10/2002 problem Important | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-116549@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Mahmut Kursun [mailto:kursun@parkgroup.com.tr]
> Sent: 16 September 2002 14:33
> To: php forum
> Subject: [PHP] php's 27/10/2002 problem Important
>
>
> If you are trying to code a sequantial date requiring
> algorithm you will
> see that for 27/10/2002 you have two timestamps!!!!
>
> And that is a serious bug I think. Any comments!
>
> timestamp : formatted date (d/m/Y)
> 1035666000 : 27/10/2002
> 1035752400 : 27/10/2002
Daylight savings!
1035666000 = 27/10/2002 00:00
but 24 hours later, because of an additional hour on 27/10/2002 due to daylight savings time-shift:
1035752400 = 27/10/2002 23:00
Moral: don't use midnight as a base for calculating daily offsets. Much better to use
something slap in the middle of the day, such as 12:00, which may shift to 11:00 or 13:00, but at
least will not cross date boundaries!!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211