Support creating timezones by numeric-string codes.

Bug #1873566 reported by Dan Strohl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pytz
New
Undecided
Unassigned

Bug Description

For example, when I do a dt.strftime('%z'), I get a string '+0800', when I look at log entries with time zones, I often see '+0800' (or similar). Right now, I parse those into hour/minute/second data, than convert them to a python timezone object... but then I may need to handle them differently since the python object doesn't have the localize method.

It would be nice to simply be able to do something like pytz.timezone('+0800') and have it return a pytz object for that offset. Understanding that it would not know where in the world it was or handle daylight savings time.

Alternativly, how about the ability to convert a python timezone object to a pytz one?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.