Derivative timezone?
Skip Montanaro
skip.montanaro at gmail.com
Tue Feb 21 09:34:04 EST 2017
More information about the Python-list mailing list
Tue Feb 21 09:34:04 EST 2017
- Previous message (by thread): Derivative timezone?
- Next message (by thread): str.format fails with JSON?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I figured out that I can drop down to a lower level and use a manually constructed tz file to create the desired timezone object. The pytz package has a build_tzinfo() function which takes a zone name and an open file object). Skip On Tue, Feb 21, 2017 at 8:06 AM, Skip Montanaro <skip.montanaro at gmail.com> wrote: > Is it possible to create a timezone which is a derivative of an > existing timezone? I'd like to create one which is several hours > different ahead of America/Chicago, but follows Chicago's DST changes. > My initial attempt was to create a timezone object using pytz: > > tz = pytz.timezone("America/Chicago") > > then add eight hours to its _utcoffset attribute, but that doesn't > work. Is "creative" timezone construction possible, or am I limited to > what pytz finds in the Olson database? > > Thx, > > Skip
- Previous message (by thread): Derivative timezone?
- Next message (by thread): str.format fails with JSON?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list