Re: tzparse.py problems

Steve Kirsch (stk@infoseek.com)
Tue, 7 Jun 1994 13:34:02 -0700

Your TZ environment variable must be of the form that satisfies the regular
expression:

tzpat = '^\([A-Z][A-Z][A-Z]\)\([-+]?[0-9]+\)\([A-Z][A-Z][A-Z]\);' + \
'\([0-9]+\)/\([0-9]+\),\([0-9]+\)/\([0-9]+\)$'

ie.., (according to the comment at the top of the file),
# XXX Unfinished.
# XXX Only the typical form "XXXhhYYY;ddd/hh,ddd/hh" is currently supported.

In your case, PST8PDT isn't in this form.
>
> I am trying to use the tzparse.py file but it will not work.
> My TZ environment variable is defined as: PST8PDT
> When I try to load anything that uses the tzparse module, here is what
> I get:
>
> fox.fox.com:$ python
> Python 1.0.2 (May 17 1994)
> Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
> >>> import MClock
> Traceback (innermost last):
> File "<stdin>", line 1
> File "./MClock.py", line 176
> import tzparse
> File "/usr/local/lib/python/tzparse.py", line 55
> tzset()
> File "/usr/local/lib/python/tzparse.py", line 41
> tzparams = tzparse(tzstr)
> File "/usr/local/lib/python/tzparse.py", line 16
> raise ValueError, 'not the TZ syntax I understand'
> ValueError: not the TZ syntax I understand
> >>> raise SystemExit
> fox.fox.com:$
>
> Any ideas? comments? help?
>
> --
> Lance Ellinghouse lance@fox.com
>
>