Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3479:86d6131847e8
timezone now applied to date for pretty-format [SF#1406861]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 20 Jan 2006 02:44:30 +0000 |
| parents | 522b11d5ba8d |
| children | b294cc477f2c |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Fri Jan 20 02:42:35 2006 +0000 +++ b/roundup/cgi/templating.py Fri Jan 20 02:44:30 2006 +0000 @@ -1528,17 +1528,22 @@ The format string is a standard python strftime format string. Note that if the day is zero, and appears at the start of the string, then it'll be stripped from the output. This is handy - for the situatin when a date only specifies a month and a year. + for the situation when a date only specifies a month and a year. ''' if not self.is_view_ok(): return self._('[hidden]') - + + if self._offset is None: + offset = self._db.getUserTimezone() + else: + offset = self._offset + if not self._value: return '' elif format is not self._marker: - return self._value.pretty(format) + return self._value.local(offset).pretty(format) else: - return self._value.pretty() + return self._value.local(offset).pretty() def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time.
