Skip to content

Commit

Permalink
apply fix python-babel#134 for babel issue python-babel#133
Browse files Browse the repository at this point in the history
  • Loading branch information
st4lk committed Jan 26, 2015
1 parent 7394751 commit 00e8526
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion babel/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ def get_timezone_gmt(datetime=None, width='long', locale=LC_TIME):
datetime = datetime.replace(tzinfo=UTC)
locale = Locale.parse(locale)

offset = datetime.tzinfo.utcoffset(datetime)
# fix for mitsuhiko/babel#133 : Any time will do since we just want the
# offset
offset = datetime.tzinfo.utcoffset(datetime_.utcnow())
seconds = offset.days * 24 * 60 * 60 + offset.seconds
hours, seconds = divmod(seconds, 3600)
if width == 'short':
Expand Down

0 comments on commit 00e8526

Please sign in to comment.