How to get UTC offset for non-standard time zone names?

2010-01-31 Thread skip
I have the pytz package but it doesn't know about non-standard timezone names like CDT5 or CST6. I can obviously infer that they are either five or six hours behind UTC. Are they constructed in some standard way so that I can assume that if a timezone name is not known to pytz I can assume the

Re: How to get UTC offset for non-standard time zone names?

2010-01-31 Thread Xavier Ho
This may not answer your question directly, but have you thought about ingoring the number at the end of these non-standard timezones? CDT is Central Daylight-saving Timezone, while CST is Central Standard Timezone. And you are correct they are -5 and -6 hours respectively. Does pytz know about

Re: How to get UTC offset for non-standard time zone names?

2010-01-31 Thread Skip Montanaro
Does pytz know about CDT and CST? Nope... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get UTC offset for non-standard time zone names?

2010-01-31 Thread Xavier Ho
Would it hurt if you put in some extra information? http://www.timeanddate.com/library/abbreviations/timezones/ HTH, -Xav P.S: You, sir, have an awesome first name. On Mon, Feb 1, 2010 at 1:57 AM, Skip Montanaro s...@pobox.com wrote: Does pytz know about CDT and CST? Nope... Skip --

Re: How to get UTC offset for non-standard time zone names?

2010-01-31 Thread Skip Montanaro
Would it hurt if you put in some extra information? http://www.timeanddate.com/library/abbreviations/timezones/ In theory, no. At work we still use the ancient Rogue Wave C++ libraries in a number of applications. It has hard-coded timezone info so when the US changed the start and end of