File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1515- fix redirect after instant registration (sf bug 1381676)
1616- fix permission checks in cgi interface (sf bug 1289557)
1717- fix permission check on RetireAction (sf bug 1407342)
18+ - timezone now applied to date for pretty-format (sf bug 1406861)
1819
1920
20212005-10-07 0.8.5
Original file line number Diff line number Diff line change @@ -1522,17 +1522,22 @@ def pretty(self, format=_marker):
15221522 The format string is a standard python strftime format string.
15231523 Note that if the day is zero, and appears at the start of the
15241524 string, then it'll be stripped from the output. This is handy
1525- for the situatin when a date only specifies a month and a year.
1525+ for the situation when a date only specifies a month and a year.
15261526 '''
15271527 if not self .is_view_ok ():
15281528 return self ._ ('[hidden]' )
1529-
1529+
1530+ if self ._offset is None :
1531+ offset = self ._db .getUserTimezone ()
1532+ else :
1533+ offset = self ._offset
1534+
15301535 if not self ._value :
15311536 return ''
15321537 elif format is not self ._marker :
1533- return self ._value .pretty (format )
1538+ return self ._value .local ( offset ). pretty (format )
15341539 else :
1535- return self ._value .pretty ()
1540+ return self ._value .local ( offset ). pretty ()
15361541
15371542 def local (self , offset ):
15381543 ''' Return the date/time as a local (timezone offset) date/time.
You can’t perform that action at this time.
0 commit comments