Re: timezones & date() breakage
| From: | Stanislav Malyshev | Date: | Tue, 27 Sep 2005 11:48:16 +0000 |
| Subject: | Re: timezones & date() breakage | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19186@lists.php.net to get a copy of this message | ||
DR>>Sure you can, you just set the timezone yourself with the
DR>>date.timezone setting. If you had e_strict errors turned on, you would
DR>>have seen a warning about this.
Not so easy. Tried that - it complains it doesn't know my timezone.
DR>>What is the timezone abbreviation (you can not call it a "timezone" as
DR>>an abbreviation is not unique per s?)? If you tell us what name is not
DR>>recognised, we can add it.
The timezone is named IDT currently, but the problem is not in this - the
problem is in "we can add it". OK, we add this one - how many ones out
there we didn't add yet? So we will be fixing it for years and still get
it not work in some places - while before the "improvement" it worked!
Most probably you will naver have the full list - since both Unix and
Windows allows to extend their timezone databases, and even more funny
thing - they allow changing rules for timezones. Does this library use OS
timezone database? I guess not, otherwise it would know my TZ by name.
Then even if you would add the name there, who would guarantee you that
the rules your library is using is the same rules the rest of OS is using?
That your app won't jump from DST to standard a week too early?
DR>>I totally disagree. It's extremely annoying if an application that
DR>>uses timezones can not use it on another platform because the data for
DR>>it is not there, or there is another abbreviation/name associated with
DR>>it.
It is much more annoying if application running on my own platform stops
working even without moving it anywhere and to fix it one needs actually
patch C code and even then he can't be sure it would work.
And I don't see why you one can't use OS services to check timezones -
AFAIK most OSes provide these.
DR>>Turn on E_STRICT error reporting... and see the documentation:
DR>>http://php.net/manual/en/ref.datetime.php
Can you quote where it says how can I fix it? And more importantly - how
someone as a PHP programmer and not C programmer can fix it if your
library doesn't know his timezone?
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115