[Zope-dev] REPOST: Timezones

Martijn Pieters mj@antraciet.nl
Mon, 26 Apr 1999 20:55:34 +0200


At 01:33 24-4-99 , Robert Leftwich wrote:
>I am re-sending this mail as I have not received any replies, surely 
>somebody knows the answer.
>
>As I work in Australia I would like to add support for our timezones to the 
>DateTime/DateTimeZone files. Adding the data to DateTime.py is fine but can 
>anyone describe the format of the data in DateTimeZone.py as it somewhat 
>cryptic to say the least ?
>

I just saw my patch (adding 33 whole-hour-offset timezones to DateTime)
checked into the CVS by Brian LLoyd. If you want these additions, you could
use CVS to get a copy of this version of DateTime.

First, make sure you can login into the CVS, see
http://www.zope.org/Community/CVS_public_access. Do so.

Now that you are logged in, go to the lib/python directory of your Zope
installation, and execute the following commands:
mv DateTime/DateTime.py DateTime/DateTime.py.bak
cvs -z9 export -r HEAD -d DateTime Packages/DateTime/DateTime.py

and restart your Zope. The export command will get you the latest copy of
the DateTime.py file, which is the only file in the DateTime package that
has had any (code) changes to it.

The timezone abbreviations added are:
UT, BST, CDT, MEST, SST, FST, WADT, EADT, NZDT, WET, WAT, AT, AST, NT,
IDLW, CET, MET, MEWT, SWT, FWT, EET, BT, ZP4, ZP5, ZP6, WAST, CCT, JST,
EAST, GST, NZT, NZST and IDLE

Some of these timezone abbreviations have more than one meaning, like BST,
which can stand for British Saving Time, or Brazilian Standard Time.... In
this case, the first timezone is presented. I did not make that decision, I
borrowed this list from (among other places), a Perl Timezone library
(Time::Zone). Yes, Perl does have it's advantages.

YMMV


-- 
Martijn Pieters, Web Developer 
| Antraciet http://www.antraciet.nl 
| Tel: +31-35-6254545 Fax: +31-35-6254555 
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj 
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
------------------------------------------