Show
Ignore:
Timestamp:
11/08/06 22:43:38 (17 years ago)
Author:
jerome
Message:

Fixed date and time parsing, although I was unable to reproduce the problem reported...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storage.py

    r3036 r3050  
    261261    def setDateLimit(self, datelimit) :     
    262262        """Sets the date limit for this quota.""" 
    263         datelimit = DateTime.ISO.ParseDateTime(str(datelimit)) 
     263        datelimit = DateTime.ISO.ParseDateTime(str(datelimit)[:19]) 
    264264        date = "%04i-%02i-%02i %02i:%02i:%02i" % (datelimit.year, datelimit.month, datelimit.day, datelimit.hour, datelimit.minute, datelimit.second) 
    265265        self.parent.writeUserPQuotaDateLimit(self, date) 
     
    403403    def setDateLimit(self, datelimit) :     
    404404        """Sets the date limit for this quota.""" 
    405         datelimit = DateTime.ISO.ParseDateTime(str(datelimit)) 
     405        datelimit = DateTime.ISO.ParseDateTime(str(datelimit)[:19]) 
    406406        date = "%04i-%02i-%02i %02i:%02i:%02i" % (datelimit.year, \ 
    407407                                                  datelimit.month, \ 
     
    759759                        dateval = None 
    760760                    try :     
    761                         DateTime.ISO.ParseDateTime(dateval) 
     761                        DateTime.ISO.ParseDateTime(dateval[:19]) 
    762762                    except :     
    763763                        dateval = None