Re: [PHP-DEV] DST From: Zeev Suraski (zeev <email protected>)
Date: 04/01/99

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 <email protected>>  http://www.zend.com/
For a PGP public key, finger bourbon <email protected>

-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>