Browse Source

pep8 fix

pull/42/head
Vincent Vinet 10 years ago
parent
commit
f8dd02fddb
  1. 2
      email_template_dateutil/email_template.py

2
email_template_dateutil/email_template.py

@ -72,7 +72,7 @@ def format_date(context, dtstr, new_format=None, tz=None):
try: try:
utc = pytz.timezone('UTC') utc = pytz.timezone('UTC')
context_tz = pytz.timezone(tz_name) context_tz = pytz.timezone(tz_name)
utc_timestamp = utc.localize(date, is_dst=False) # UTC = no DST
utc_timestamp = utc.localize(date, is_dst=False)
date = utc_timestamp.astimezone(context_tz) date = utc_timestamp.astimezone(context_tz)
except Exception: except Exception:
_logger.debug("failed to compute context/client-specific " _logger.debug("failed to compute context/client-specific "

Loading…
Cancel
Save