Mercurial > babel > old > mirror
diff 0.9.x/babel/dates.py @ 513:3a00f8293d47 stable
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 | d05e5e1674dd |
children | 931424efdcf0 |
line wrap: on
line diff
--- a/0.9.x/babel/dates.py +++ b/0.9.x/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: