You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pytz module is the standard for time zones. The time zones returned by uszipcode don't seem to be compatible "Eastern" is returned for most east coast cities, but 'US/Eastern' is correct:
from pytz import timezone
x = timezone('Eastern')
Traceback (most recent call last):
File "", line 1, in
File "/home/xxxx/.local/lib/python3.6/site-packages/pytz/init.py", line 181, in timezone
raise UnknownTimeZoneError(zone)
pytz.exceptions.UnknownTimeZoneError: 'Eastern'
x = timezone('US/Eastern')
No error with 'US/Eastern'.
The text was updated successfully, but these errors were encountered:
@rabinnh it is because the source I crawled is natively not compatible with pytz. I think I need to iterate through all timezone info and try converting to pytz. If exception catched, then handle it differently. But it is a lot of works. Will do it in next major release.
Please make your change IANA-compatible based on Python 3.9 zoneinfo package.
Time zone labels do NOT contain daylight savings time information. For example, Arizona and Hawaii do not implement daylight savings time, and have separate IANA labels to infer that information.
The pytz module is the standard for time zones. The time zones returned by uszipcode don't seem to be compatible "Eastern" is returned for most east coast cities, but 'US/Eastern' is correct:
No error with 'US/Eastern'.
The text was updated successfully, but these errors were encountered: