SHA256
1
0
forked from pool/python-Babel
python-Babel/fix-timezone-test.patch

14 lines
550 B
Diff

--- babel/dates.py.old 2015-01-28 16:54:06.306129842 -0800
+++ babel/dates.py 2015-01-28 16:54:44.574118917 -0800
@@ -308,7 +308,9 @@
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':