Re: timezones & date() breakage
| From: | Derick Rethans | Date: | Wed, 28 Sep 2005 12:52:37 +0000 |
| Subject: | Re: timezones & date() breakage | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19257@lists.php.net to get a copy of this message | ||
On Wed, 28 Sep 2005, Stanislav Malyshev wrote:
> DR>>But you do need UTC somewhere, as *all* date code (OS, applications)
> DR>>use UTC timestamps to calculate the current time.
>
> So? They are able to use it transparently without requiring me to do any
> special configuration for each application - they just go out and display
> the right date. Only PHP 5.1 needs separate configuration for that. This
> is broken.
I wouldn't call it broken, just less inituitive. But besides that point,
I looked at some data and have a patch that allows the timezone guessing
code to also check against the GMT offset, and not only the
abbreviation. This means that with these DB entries:
{ "idt", 1, -HOUR ( 3), "Asia/Tel_Aviv" },
{ "idt", 1, -HOUR (4.5), "Iran/Teheran" },
{ "idt", 1, -HOUR (6.5), "Asia/Calcutta" },
IDT will be recognised correctly for all three variations. There are two
ways of creating the database for this:
1. by iterating over the timezone database and collecting all the
possible combinations
2. by copying the data from http://www.worldtimezone.com/wtz-names/timezonenames.html
I think option 1 is the better here, and I'll play with a script to
generated that data tonight. After that I'll commit the patch too.
I think this shoul adequately solve the problems that you encountered.
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org