[Tickets #2684] Win2K, PHP, time() and TZ

bugs@bugs.horde.org bugs at bugs.horde.org
Tue Sep 27 14:53:05 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=2684
-----------------------------------------------------------------------
 Ticket             | 2684
 Updated By         | rharvey at hyvernion.com
 Summary            | Win2K, PHP, time() and TZ
 Queue              | Horde Base
 Version            | 3.0.5
 State              | Feedback
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


rharvey at hyvernion.com (2005-09-27 14:53) wrote:

I ran the script as requested starting with the correct time using the
America/New York TZ setting in your test script.  These were the results:

Tue, 27 Sep 2005 17:33:29 -0400    // correct
Tue, 27 Sep 2005 22:33:29 +0100   // what PHP defaults to

Ok, so the EDT TZ is -4 not -5, I can't keep track of the time changes,
lol.
Anyways, when the putenv() is issued PHP goes into a "default" TZ.

Same problem as described on the bug tracker at PHP's website as I had
mentioned previously.  The folks at PHP identified the issue in earlier
versions of PHP as a PHP issue and stated it was solved but it appears to
still be a problem.

According to PHP: "The problem was that putenv("TZ=...") would call tzset()
in order to update the libc with the timezone information for the time
related functions, but PHP would not call tzset() again when the environment
was reset."

I don't know enough of the internal workings of PHP to think of any "work
arounds"...  I thought maybe making a putenv or setlocale script at the
start of my webpages to "reset" the PHP TZ but it still does me no good
within Horde.  Besides, after trying the test script I see it wouldn't have
worked anyhow.

What's strange is only Horde does this when other web apps that manipulate
TZ's don't...  <shrug>  This is such a bummer...




More information about the bugs mailing list