[imp] timezone configuration patch
Seth Fitzsimmons
seth@note.amherst.edu
Tue, 14 Aug 2001 09:43:05 -0400 (EDT)
---------------------- multipart/mixed attachment
Hey folks.
I threw Chuck a patch that does about the same thing a couple weeks ago.
Not quite sure what happened to it (I've attempted to attach it here).
It's got the full list of POSIX Country/City codes in a separate file
(timezone.php, which does in horde/config); they're set up so you can
easily change the description for a given timezone.
I tested a variation of this code (not Horde/IMP) on a Windows
box; doesn't work (as Windows doesn't seem to support TZ env vars). Not
sure about Solaris.
Michael - I should have put it on the list to potentially save you some
time. Sorry.
seth
On Tue, 14 Aug 2001, Jan Schneider wrote:
> Wow, thanks Michael for that great work!
>
> I would like to commit that stuff to cvs, anyone against it?
>
> Btw: I discovered the same problem with the +0200 notation and didn't find a
> solution so far. Thanks a lot!
>
> Jan.
>
> Zitat von Michael M Slusarz <slusarz@bigworm.colorado.edu>:
>
> > All,
> > Yet another hack from me :) This time I grew tired of waiting for a timezone
> >
> > drop-down menu implementation to be done so I did it myself.
> >
> > Diffs/new files/pictures of the hack in action can be found at:
> > http://bigworm.colorado.edu/imp-patches/timezone.php
> >
> > A few things I discovered while putting it together:
> >
> > 1. A string of the form [+-]0200 ([+-]hours difference from GMT) does NOT
> > appear to work at all. I'm using a Linux system, and if you put anything in
> >
> > this form and send a message it appears that whatever is using the TZ
> > environment variable (sendmail/postfix/qmail ??) will just ignore it and your
> >
> > message will be sent with time -0000 GMT.
> >
> > 2. This is because the correct POSIX.1 TZ implementation is:
> > STDoffset[DST[offset], (some other stuff...)]
> > where STD is the 3+ letter code for the time zone and
> > where DST is the 3+ letter code for the daylight time zone
> >
> > Thus, the TZ variable must be something as follows:
> > EST5EDT
> > MST7MDT
> > etc.
> >
> > This works fine for american timezones, but it turns out there is no
> > convention for worldwide timezone abbreviations, etc. Additionally,
> > half-hour
> > deviations do not seem to work well. If you try IT-3:30 (Iran - 3hr 30min.),
> >
> > it will say your mail message came from about a month ago and stuff. Plus,
> > the
> > default DST rules are americanized and may not be correct for the rest of
> > world - and most likely isn't. Yuck.
> >
> > 3. Luckily, there is the POSIX.1 extensions of Country/City which handles all
> >
> > of these problems. This convention handles all of the peculiarities that
> > occur
> > in the same time zones (i.e. there are about 3-4 different time zone rules in
> >
> > the state of Indiana alone). This is the way I have implemented my patch. A
> >
> > nice thorough list of Country/City combinations can be downloaded from
> > ftp://elsie.nci.nih.gov/pub/. These are the timezone codes used by GNU/glibc
> >
> > based systems. The only drawback is that I don't know if this will work on a
> >
> > non GNU-like system (i.e Windows, Solaris). But this is as good as I think
> > it
> > can get without implementing an entire timezone system in PHP.
> >
> > The patch allows you to lock the timezone and set a default timezone (using
> > the
> > normal syntax in imp/config/prefs.php).
> >
> > Let me know if you have any questions/comments.
> >
> > michael
> >
> > _______________________________________________
> > Michael Slusarz [slusarz@bigworm.colorado.edu]
> > The University of Colorado at Boulder
> >
> > --
> > IMP mailing list: http://horde.org/imp/
> > Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> >
> >
>
>
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>
---------------------- multipart/mixed attachment--