# Timezone stuff - conclusion

- Thread: https://externals.io/message/19508
- Original archive: https://news-web.php.net/php.internals/19508
- Started by Zeev Suraski on 2005-10-08T13:30:03+00:00
- Messages: 17
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #19508 — Zeev Suraski — 2005-10-08T13:30:03+00:00

URL: https://externals.io/message/19508#19508

I've been away from email for the last couple of weeks - read through the 
timezone thread, and didn't really see a conclusion.

My suggestion is to restore the old code in its entirely, and introduce the 
new implementation as new functions with a proper prefix, a-la PHP 2005.  I 
think it's better than an INI entry, and it should be fairly 
straightforward to implement.

I don't think anybody is underestimating Derick's efforts towards building 
this new date functionality.  I certainly don't.  I also don't see any 
reason to break compatibility in something as basic as this, so this should 
be introduced either as a new (preferably) or optional (less preferably) 
feature.

Zeev

---

## #19509 — Derick Rethans — 2005-10-08T13:33:45+00:00

URL: https://externals.io/message/19508#19509 · In reply to: #19508

> I've been away from email for the last couple of weeks - read through the
> timezone thread, and didn't really see a conclusion.
> 
> My suggestion is to restore the old code in its entirely, and introduce the
> new implementation as new functions with a proper prefix, a-la PHP 2005.  I
> think it's better than an INI entry, and it should be fairly straightforward
> to implement.

Nice that you come with this now after I spend a whole bloody week 
trying to make things as BC as possible, and even on Windows. 

Derick

---

## #19510 — Zeev Suraski — 2005-10-08T13:44:13+00:00

URL: https://externals.io/message/19508#19510 · In reply to: #19508

At 15:33 08/10/2005, Derick Rethans wrote:
>
>
> > […]
> straightforward
> > […]
>
>Nice that you come with this now after I spend a whole bloody week
>trying to make things as BC as possible, and even on Windows.

Thank you, you're welcome!

Zeev

---

## #19511 — Christian Stocker — 2005-10-08T13:44:29+00:00

URL: https://externals.io/message/19508#19511 · In reply to: #19508

> I've been away from email for the last couple of weeks - read through
> the timezone thread, and didn't really see a conclusion.

IIRC the conclusion was, that Derick tries to make the TZ detection
better (which was the only BC problem, AFAIK). And according to him,
that's now almost solved (except some weird problems on Windows).

He even made a pecl package for updating the TZ data easily should that
change.

If the TZ detection works reliable, I don't see any reason to revert or
postpone Dericks work, the timezone handling of his implementation is so
much better than the old one, it's really worth the upgrade for everyone
having to deal with different timezones.

Just my 2 cents.

chregu

> 
> My suggestion is to restore the old code in its entirely, and introduce
> the new implementation as new functions with a proper prefix, a-la PHP
> 2005.  I think it's better than an INI entry, and it should be fairly
> straightforward to implement.
> 
> I don't think anybody is underestimating Derick's efforts towards
> building this new date functionality.  I certainly don't.  I also don't
> see any reason to break compatibility in something as basic as this, so
> this should be introduced either as a new (preferably) or optional (less
> preferably) feature.
> 
> Zeev
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker@bitflux.ch |  GPG 0x5CE1DECB

---

## #19512 — Zeev Suraski — 2005-10-08T13:55:51+00:00

URL: https://externals.io/message/19508#19512 · In reply to: #19508

At 15:44 08/10/2005, Christian Stocker wrote:


>
> > […]
>
>IIRC the conclusion was, that Derick tries to make the TZ detection
>better (which was the only BC problem, AFAIK). And according to him,
>that's now almost solved (except some weird problems on Windows).
>
>He even made a pecl package for updating the TZ data easily should that
>change.
>
>If the TZ detection works reliable, I don't see any reason to revert or
>postpone Dericks work, the timezone handling of his implementation is so
>much better than the old one, it's really worth the upgrade for everyone
>having to deal with different timezones.

Ok, maybe I missed it in the lengthy thread.

Contrary to what Derick may have thought from my response, I wasn't trying 
to reopen the discussion, just to make sure it doesn't linger to death.

Zeev

---

## #19514 — Ilia Alshanetsky — 2005-10-08T14:59:44+00:00

URL: https://externals.io/message/19508#19514 · In reply to: #19512

Zeev Suraski wrote:
> Ok, maybe I missed it in the lengthy thread.


I suspect that is very much the case. Derick has been working quite
diligently over the last little while at getting the BC problems solved
and as far as I know all but a few Win32 issues have been resolved to
everyones satisfaction.

Ilia

---

## #19517 — Lukas Smith — 2005-10-08T18:53:28+00:00

URL: https://externals.io/message/19508#19517 · In reply to: #19514

Ilia Alshanetsky wrote:
> Zeev Suraski wrote:
> 
> > […]
> 
> 
> 
> I suspect that is very much the case. Derick has been working quite
> diligently over the last little while at getting the BC problems solved
> and as far as I know all but a few Win32 issues have been resolved to
> everyones satisfaction.

And for this situation there is the ini flag as a fallback ..

BTW: while `ini_set()` has a tendency to be disabled I remember Stig added 
 `set_include_path()` so that users might have a change of still fixing 
their include path to handle their PEAR paths .. maybe we need something 
like this as well for this timezone setting .. or maybe we need a new 
ini_set method for things deemed not security relevant that shared 
hosters may leave alone ..?

regards,
Lukas

---

## #19518 — Nuno Lopes — 2005-10-08T19:43:11+00:00

URL: https://externals.io/message/19508#19518 · In reply to: #19511

> 
> > […]
>
> IIRC the conclusion was, that Derick tries to make the TZ detection
> better (which was the only BC problem, AFAIK). And according to him,
> that's now almost solved (except some weird problems on Windows).

Yep, even on windows is it almost working at 100% :) And I'm having much 
more success with the new code, specially on Windows and Solaris.


> He even made a pecl package for updating the TZ data easily should that
> change.

Upgrading the TZ data should be as easy as upgrading a PECL package.


> If the TZ detection works reliable, I don't see any reason to revert or
> postpone Dericks work, the timezone handling of his implementation is so
> much better than the old one, it's really worth the upgrade for everyone
> having to deal with different timezones.

Yes it shouldn't be reverted. I think it is working well, and it is already 
covered by a large amount of test cases, so the BC breaking chances are 
minimal.

Nuno


> Just my 2 cents.
>
> chregu
>
> > […]

---

## #19520 — Lester Caine — 2005-10-08T21:48:09+00:00

URL: https://externals.io/message/19508#19520 · In reply to: #19512

Zeev Suraski wrote:

> > […]
> 
> Ok, maybe I missed it in the lengthy thread.
> 
> Contrary to what Derick may have thought from my response, I wasn't 
> trying to reopen the discussion, just to make sure it doesn't linger to 
> death.

I think that the only thing that is missing is that there is no way of 
identifying the CLIENT time/daylight zone so we have to get users to 
register their current location in order to use it on anything other 
than a local server :(

Of cause the main problem is that if we use it then applications will be 
totally tied to a version of PHP which has yet to actually be accepted 
by ISP! I think THAT was the main reason for wanting a plug in module 
that could be back ported?

-- 
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.

---

## #19524 — Derick Rethans — 2005-10-09T01:42:03+00:00

URL: https://externals.io/message/19508#19524 · In reply to: #19517

> Ilia Alshanetsky wrote:
> > […]
> 
> And for this situation there is the ini flag as a fallback ..
> 
> BTW: while `ini_set()` has a tendency to be disabled I remember Stig added
> `set_include_path()` so that users might have a change of still fixing their
> include path to handle their PEAR paths .. maybe we need something like this
> as well for this timezone setting .. or maybe we need a new ini_set method for
> things deemed not security relevant that shared hosters may leave alone ..?

You don't need this, as there is: 
http://no.php.net/date_default_timezone_set

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #19525 — Derick Rethans — 2005-10-09T01:42:58+00:00

URL: https://externals.io/message/19508#19525 · In reply to: #19520

> Zeev Suraski wrote:
> 
> > […]
> 
> I think that the only thing that is missing is that there is no way of
> identifying the CLIENT time/daylight zone so we have to get users to register
> their current location in order to use it on anything other than a local
> server :(

Well yeah, but that's just simply impossible (and has nothing to do with 
the new code anyway).

regards,
Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #19527 — Lukas Smith — 2005-10-09T03:00:28+00:00

URL: https://externals.io/message/19508#19527 · In reply to: #19524

Derick Rethans wrote:

> You don't need this, as there is: 
> http://no.php.net/date_default_timezone_set

cool ..

now we only need to get the list of possible legal TZ's documented (or 
linked from the docs) .. atleast I do not see it yet (but it might be 
just me not seeing it at 5 am after coming home from a party .. just had 
too much time thinking on the bike ride home).

regards,
Lukas

---

## #19532 — Nuno Lopes — 2005-10-09T12:05:57+00:00

URL: https://externals.io/message/19508#19532 · In reply to: #19527

> Derick Rethans wrote:
>
> > […]
>
> cool ..
>
> now we only need to get the list of possible legal TZ's documented (or 
> linked from the docs) .. atleast I do not see it yet (but it might be just 
> me not seeing it at 5 am after coming home from a party .. just had too 
> much time thinking on the bike ride home).

Derick added that yesterday.
While the manual isn't rebuilt, take a look at 
http://livedocs.phpdoc.info/index.php?l=en&q=timezones
This page is linked from the `date_default_timezone_set()` page.


Nuno

---

## #19533 — Derick Rethans — 2005-10-09T12:19:57+00:00

URL: https://externals.io/message/19508#19533 · In reply to: #19527

> Derick Rethans wrote:
> 
> > […]
> 
> cool ..
> 
> now we only need to get the list of possible legal TZ's documented (or linked
> from the docs) .. atleast I do not see it yet (but it might be just me not
> seeing it at 5 am after coming home from a party .. just had too much time
> thinking on the bike ride home).

I started the build when I got home at 3am ;-) It's now online:
http://www.php.net/manual/en/timezones.php, I'll check later today where 
I want to link this in exactly.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #19562 — Andrei Zmievski — 2005-10-10T23:18:20+00:00

URL: https://externals.io/message/19508#19562 · In reply to: #19508

How many date formatting functions do we need?

-Andrei

Zeev Suraski wrote:
> I've been away from email for the last couple of weeks - read through the
> timezone thread, and didn't really see a conclusion.
>
> My suggestion is to restore the old code in its entirely, and introduce
> the
> new implementation as new functions with a proper prefix, a-la PHP 2005.
> I
> think it's better than an INI entry, and it should be fairly
> straightforward to implement.
>
> I don't think anybody is underestimating Derick's efforts towards building
> this new date functionality.  I certainly don't.  I also don't see any
> reason to break compatibility in something as basic as this, so this
> should
> be introduced either as a new (preferably) or optional (less preferably)
> feature.
>
> Zeev

---

## #19563 — Derick Rethans — 2005-10-11T07:07:10+00:00

URL: https://externals.io/message/19508#19563 · In reply to: #19562

> How many date formatting functions do we need?

Two, one for non-locale based formatting, and one for locale based 
formatting. Unfortunately as we only have a 32 bit integer we also need 
some outside of the current `date()` one, so that makes 4 (if we count 
 `strftime()`, which relies on system locales YUCK!, too).

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #19564 — Zeev Suraski — 2005-10-11T07:58:36+00:00

URL: https://externals.io/message/19508#19564 · In reply to: #19508

As many as make sense.  But this thread is dead, if all goes well and the 
work Derick has done sorts things out.

Zeev

At 01:18 11/10/2005, Andrei Zmievski wrote:
>How many date formatting functions do we need?
>
>-Andrei
>
>Zeev Suraski wrote:
> > […]
