Use pytz to generate TZ raw environment variable

Asked by Mike Crowe on 2010-09-02

Hi folks,

I'm trying to find a way to go from a region, such as "America/Mexico_City", to the raw TZ environment variable (for an embedded system), such as "CST6CDT,M4.1.0/2,M10.5.0/2.

Any chance I can do this somehow with pytz?

TIA
Mike

Question information

Language:
English Edit question
Status:
Answered
For:
pytz Edit question
Assignee:
No assignee Edit question
Last query:
2010-09-02
Last reply:
2010-09-03
Stuart Bishop (stub) said : #1

I don't think so. pytz only deals with the compiled zoneinfo files, and information like 'First Sunday or October' is lost during compilation.

Can you help with this problem?

Provide an answer of your own, or ask Mike Crowe for more information if necessary.

To post a message you must log in.