dtr has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a bulletin board type program in mod_perl_2 which will display date-times to users in their own time zone, rather than displaying them in the system time zone as many sites seem to do.
In perl 5.6.1, if you modify the value of $ENV{TZ} before calling localtime, then you get back the time fields for that time zone. Very handy if you've got all your dates in your database in UTC.
In 5.8.0, you have to call POSIX::tzset after updating this variable (many thanks to Chmrr for posting this already).
However, this works beautifully from a script, but not at all from mod_perl_2. Does anyone have any idea why this might be the case???
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mod_Perl multiple timezones
by fglock (Vicar) on Jul 24, 2003 at 00:57 UTC | |
|
Re: Mod_Perl multiple timezones
by dga (Hermit) on Jul 23, 2003 at 17:56 UTC | |
by dtr (Scribe) on Jul 23, 2003 at 19:14 UTC | |
by Chmrr (Vicar) on Jul 23, 2003 at 23:18 UTC | |
by dtr (Scribe) on Jul 24, 2003 at 10:00 UTC | |
by Anonymous Monk on Aug 05, 2003 at 02:21 UTC | |
by waldo22 (Novice) on Mar 08, 2011 at 15:36 UTC | |
by jswalker (Initiate) on May 14, 2012 at 16:18 UTC | |
|
Re: Mod_Perl multiple timezones
by perrin (Chancellor) on Jul 23, 2003 at 17:22 UTC |