Ticket #5470: utils_dateformat_py.patch
File utils_dateformat_py.patch, 749 bytes (added by , 17 years ago) |
---|
-
django/utils/dateformat.py
251 251 """Time zone offset in seconds (i.e. '-43200' to '43200'). The offset 252 252 for timezones west of UTC is always negative, and for those east of UTC 253 253 is always positive.""" 254 return self.timezone.utcoffset(self.data).seconds 254 offset = self.timezone.utcoffset(self.data) 255 # Only days can be negative so negative offsets have days=-1 and 256 # seconds positive. 257 return offset.days * 24 * 60 * 60 + offset.seconds 255 258 256 259 def format(value, format_string): 257 260 "Convenience function"