def safe_timezone(time_zone):
try:
return pytz.timezone(time_zone)
except pytz.UnknownTimeZoneError:
# This is a hack! We need to audit for these and clean them up.
print 'BAD_TZ: %s' % time_zone
return pytz.timezone('America/Los_Angeles')
评论列表
文章目录