Changeset 3050
- Timestamp:
- 11/08/06 22:43:38 (18 years ago)
- Location:
- pykota/trunk
- Files:
-
- 7 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r3049 r3050 947 947 now = DateTime.now() 948 948 try : 949 previous = DateTime.ISO.ParseDateTime(str(self.Printer.LastJob.JobDate) ).localtime()949 previous = DateTime.ISO.ParseDateTime(str(self.Printer.LastJob.JobDate)[:19]).localtime() 950 950 except : 951 951 previous = now -
pykota/trunk/cgi-bin/printquota.cgi
r2953 r3050 241 241 else : 242 242 billingcode_url = None 243 curdate = DateTime.ISO.ParseDateTime(str(job.JobDate) )243 curdate = DateTime.ISO.ParseDateTime(str(job.JobDate)[:19]) 244 244 self.report.append('<tr class="%s">%s</tr>' % \ 245 245 (oddevenclass, \ -
pykota/trunk/NEWS
r3048 r3050 24 24 - 1.25alpha15 (2006-11-06) : 25 25 26 - Fixed date and time parsing problems. 27 26 28 - Finally simplified the locking code again, and checked that no 27 29 stalled lock can persist. The lock files remain on disk though, -
pykota/trunk/pykota/dumper.py
r3030 r3050 255 255 username = entry[fields["username"]] 256 256 jobid = entry[fields["jobid"]] 257 jobdate = DateTime.ISO.ParseDateTime(str(entry[fields["jobdate"]]) )257 jobdate = DateTime.ISO.ParseDateTime(str(entry[fields["jobdate"]])[:19]) 258 258 gmtoffset = jobdate.gmtoffset() 259 259 jobdate = "%s %+03i00" % (jobdate.strftime("%d/%b/%Y:%H:%M:%S"), gmtoffset.hour) -
pykota/trunk/pykota/reporter.py
r2945 r3050 94 94 elif quota.DateLimit is not None : 95 95 now = DateTime.now() 96 datelimit = DateTime.ISO.ParseDateTime(str(quota.DateLimit) )96 datelimit = DateTime.ISO.ParseDateTime(str(quota.DateLimit)[:19]) 97 97 if now >= datelimit : 98 98 datelimit = "DENY" -
pykota/trunk/pykota/storage.py
r3036 r3050 261 261 def setDateLimit(self, datelimit) : 262 262 """Sets the date limit for this quota.""" 263 datelimit = DateTime.ISO.ParseDateTime(str(datelimit) )263 datelimit = DateTime.ISO.ParseDateTime(str(datelimit)[:19]) 264 264 date = "%04i-%02i-%02i %02i:%02i:%02i" % (datelimit.year, datelimit.month, datelimit.day, datelimit.hour, datelimit.minute, datelimit.second) 265 265 self.parent.writeUserPQuotaDateLimit(self, date) … … 403 403 def setDateLimit(self, datelimit) : 404 404 """Sets the date limit for this quota.""" 405 datelimit = DateTime.ISO.ParseDateTime(str(datelimit) )405 datelimit = DateTime.ISO.ParseDateTime(str(datelimit)[:19]) 406 406 date = "%04i-%02i-%02i %02i:%02i:%02i" % (datelimit.year, \ 407 407 datelimit.month, \ … … 759 759 dateval = None 760 760 try : 761 DateTime.ISO.ParseDateTime(dateval )761 DateTime.ISO.ParseDateTime(dateval[:19]) 762 762 except : 763 763 dateval = None -
pykota/trunk/pykota/tool.py
r3045 r3050 544 544 now = DateTime.now() 545 545 if userpquota.DateLimit is not None : 546 datelimit = DateTime.ISO.ParseDateTime(str(userpquota.DateLimit) )546 datelimit = DateTime.ISO.ParseDateTime(str(userpquota.DateLimit)[:19]) 547 547 else : 548 548 datelimit = now + self.config.getGraceDelay(printer.Name) … … 603 603 now = DateTime.now() 604 604 if grouppquota.DateLimit is not None : 605 datelimit = DateTime.ISO.ParseDateTime(str(grouppquota.DateLimit) )605 datelimit = DateTime.ISO.ParseDateTime(str(grouppquota.DateLimit)[:19]) 606 606 else : 607 607 datelimit = now + self.config.getGraceDelay(printer.Name)