fixtime.diff

Index: PyDS/MacrosTool.py
===================================================================
RCS file: /pyds/PyDS/PyDS/MacrosTool.py,v
retrieving revision 1.59
diff -c -r1.59 MacrosTool.py
*** PyDS/MacrosTool.py  11 Apr 2003 12:36:52 -0000      1.59
--- PyDS/MacrosTool.py  16 Apr 2003 04:39:27 -0000
***************
*** 502,512 ****
                        now = time.gmtime(float(now))
                else:
                        now = time.gmtime(time.time())
!               return time.strftime('%a, %d %h %Y %H:%M:%S GMT', now)

        # this macro parses a standard time string given by TodayFull
        def parseTodayFull(self, date):
!               return calendar.timegm(strptime(date, '%a, %d %h %Y %H:%M:%S GMT'))

        # This macro creates the onClick attribute for a link with given parameters
        # to open a new window for this link.
--- 502,517 ----
                        now = time.gmtime(float(now))
                else:
                        now = time.gmtime(time.time())
!               return time.strftime('%a, %d %m %Y %H:%M:%S GMT', now)

        # this macro parses a standard time string given by TodayFull
        def parseTodayFull(self, date):
!               parseFormat = '%a, %d %m %Y %H:%M:%S GMT'
!               try:
!                       return calendar.timegm(strptime(date, parseFormat))
!               except ValueError:
!                       raise ValueError, 'time data "%s" did not match format "%s"' % (
!                               date, parseFormat)

        # This macro creates the onClick attribute for a link with given parameters
        # to open a new window for this link.

last change 2003-04-16 14:41:36

April 2003
MoTuWeThFrSaSu
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
282930    
Mar
2003
 May
2003

Here's a context diff for fixing the "lost month" problem in the current (2003/04/16 13:40 AEST) CVS version of PyDS

XML-Image Letterimage

© 2003-2004, Garth T Kidd