[dev] timezone pref

Max Kalika max@the-triumvirate.net
Thu, 17 May 2001 14:05:58 -0700


Quoting Jon Parise <jon@csh.rit.edu>:

> On Thu, May 17, 2001 at 10:14:16AM -0700, Max Kalika wrote:
> 
> This produces 'EDT4' on my system.  Is that valid?  I thought
> only 'EST5EDT' would be correct for my location.

Whoops, you're right...on a solaris box this produced a time that was an hour 
off, however:

putenv('TZ=' . sprintf("%s%d%s", date('T'), date('Z') / -3600, date('T')))

worked correctly on all the systems I tried.

Anyway your fix is probably better (though having a default in the prefs, would 
show the users an example).

-- 
/// max kalika 
// max@the-triumvirate.net 

"and after a while you'll stop making computers out of stuff and start making 
stuff out of computers" -- douglas adams 4/5/01