Re: date() and wrong timezone (or time)
| From: | Jochem Maas | Date: | Thu, 07 Feb 2008 13:34:05 +0000 |
| Subject: | Re: date() and wrong timezone (or time) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268868@lists.php.net to get a copy of this message | ||
Martin Marques schreef:
Nathan Nobbe escribió:I doubt that debian stable is pushing newer versions of TZ db, than that found in php ... you don't mention your php version btw.On Feb 6, 2008 6:13 AM, Martin Marques <martin@marquesminen.com.ar> wrote:I got an update from tzdata on a Debian server due to a daylight saving change here in Argentina.
what timezone does php think it's in? - output all stuff from date, not just hour:minutes.The problem is that, even when the system sees the correct time, php keeps giving me the *old* hour. $ date mié feb 6 09:03:57 ARST 2008 $ echo "<?php echo date('H:i') . \"\n\"; ?>"|php5 08:04 What can my problem be?
it should be set to something, so fix that.see what you have as the value for the date.timezone ini setting.I've already checked that, and it's not set.
Anyway, I found out that PHP uses an internal tz database (very bad IMHO) and it might be out of date.there is a good reason for this being internal - and if you search the internals mailing list archive you'll find plenty of discussion about it. whether it's bad depends on whether you look at it from a phper's POV or a sysadmin/package maintainers POV - there is no way to make everyone happy in this situation AFAICT.