@@ -515,6 +515,7 @@ def history(self, direction='descending', dre=re.compile('\d+')):
515515 comments = {}
516516 history = self ._klass .history (self ._nodeid )
517517 history .sort ()
518+ timezone = self ._db .getUserTimezone ()
518519 if direction == 'descending' :
519520 history .reverse ()
520521 for prop_n in self ._props .keys ():
@@ -530,7 +531,7 @@ def history(self, direction='descending', dre=re.compile('\d+')):
530531 self ._klass .get (self ._nodeid , prop_n , None ), current [prop_n ])
531532
532533 for id , evt_date , user , action , args in history :
533- date_s = str (evt_date ).replace ("." ," " )
534+ date_s = str (evt_date . local ( timezone ) ).replace ("." ," " )
534535 arg_s = ''
535536 if action == 'link' and type (args ) == type (()):
536537 if len (args ) == 3 :
@@ -632,10 +633,10 @@ def history(self, direction='descending', dre=re.compile('\d+')):
632633 current [k ] = old
633634
634635 elif isinstance (prop , hyperdb .Date ) and args [k ]:
635- d = date .Date (args [k ])
636+ d = date .Date (args [k ]). local ( timezone )
636637 cell .append ('%s: %s' % (k , str (d )))
637638 if current .has_key (k ):
638- cell [- 1 ] += ' -> %s' % current [k ]
639+ cell [- 1 ] += ' -> %s' % date . Date ( current [k ]). local ( timezone )
639640 current [k ] = str (d )
640641
641642 elif isinstance (prop , hyperdb .Interval ) and args [k ]:
@@ -918,15 +919,15 @@ def plain(self):
918919 '''
919920 if self ._value is None :
920921 return ''
921- return str (self ._value )
922+ return str (self ._value . local ( self . _db . getUserTimezone ()) )
922923
923924 def field (self , size = 30 ):
924925 ''' Render a form edit field for the property
925926 '''
926927 if self ._value is None :
927928 value = ''
928929 else :
929- value = cgi .escape (str (self ._value ))
930+ value = cgi .escape (str (self ._value . local ( self . _db . getUserTimezone ()) ))
930931 value = '"' .join (value .split ('"' ))
931932 return '<input name="%s" value="%s" size="%s">' % (self ._name , value , size )
932933
0 commit comments