Mercurial > babel > old > babel-test
diff babel/dates.py @ 511:f2098e9c05b4 stable-0.9.x
Fix bad check in format_time (closes #257), reported with patch and tests by jomae
author | fschwarz |
---|---|
date | Fri, 04 Mar 2011 22:34:14 +0000 |
parents | 3295127550fe |
children | 790d49d8ba30 |
line wrap: on
line diff
--- a/babel/dates.py +++ b/babel/dates.py @@ -578,7 +578,7 @@ if isinstance(time, datetime): if tzinfo is not None: time = time.astimezone(tzinfo) - if hasattr(tzinfo, 'localize'): # pytz + if hasattr(tzinfo, 'normalize'): # pytz time = tzinfo.normalize(time) time = time.timetz() elif tzinfo is not None: