File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 3131- HTTP authorization takes precedence over session cookie (sf bug 1396134)
3232- enforce correct encoding of PostgreSQL backend (sf bug 1374235)
3333- grouping/sorting on link to same class fixed (sf bug 1404930)
34+ - timezone now applied to date for pretty-format (sf bug 1406861)
35+
3436
35372005-10-07 0.9.0b1
3638Feature:
Original file line number Diff line number Diff line change @@ -1528,17 +1528,22 @@ def pretty(self, format=_marker):
15281528 The format string is a standard python strftime format string.
15291529 Note that if the day is zero, and appears at the start of the
15301530 string, then it'll be stripped from the output. This is handy
1531- for the situatin when a date only specifies a month and a year.
1531+ for the situation when a date only specifies a month and a year.
15321532 '''
15331533 if not self .is_view_ok ():
15341534 return self ._ ('[hidden]' )
1535-
1535+
1536+ if self ._offset is None :
1537+ offset = self ._db .getUserTimezone ()
1538+ else :
1539+ offset = self ._offset
1540+
15361541 if not self ._value :
15371542 return ''
15381543 elif format is not self ._marker :
1539- return self ._value .pretty (format )
1544+ return self ._value .local ( offset ). pretty (format )
15401545 else :
1541- return self ._value .pretty ()
1546+ return self ._value .local ( offset ). pretty ()
15421547
15431548 def local (self , offset ):
15441549 ''' Return the date/time as a local (timezone offset) date/time.
You can’t perform that action at this time.
0 commit comments