Re: DST

From: Date: Thu, 01 Apr 1999 04:36:02 +0000
Subject: Re: DST
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-4868@lists.php.net to get a copy of this message
At 20:27 31/03/99 +0200, Sascha Schumann wrote: >Does anyone have further info on how daylight saving time affects local >time calculation? I was used to add 3600 to time()[1] values in PHP >applications, but since DST is in effect this is not necessary any more (=> >times are wrong now, of course). > >Any input appreciated. > > [1] effectively, this happened in a call to date() In general, you mustn't touch the timestamps that way - never add or subtract 3600 seconds to take care of daylight saving time. In fact, the only correct solution to handle this is to have an updated zone file for any time range that you handle; If that's the case, DST is completely transparent to you. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4868) next »