Changeset 705 for pykota/trunk

Show
Ignore:
Timestamp:
02/06/03 00:00:12 (22 years ago)
Author:
jalet
Message:

Forgotten import
Bad datetime conversion

Location:
pykota/trunk/pykota
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/requesters/snmp.py

    r695 r705  
    1717# 
    1818# $Log$ 
     19# Revision 1.2  2003/02/05 23:00:12  jalet 
     20# Forgotten import 
     21# Bad datetime conversion 
     22# 
    1923# Revision 1.1  2003/02/05 21:28:17  jalet 
    2024# Initial import into CVS 
     
    2327# 
    2428 
     29import os 
    2530from pykota.requester import PyKotaRequesterError 
    2631 
  • pykota/trunk/pykota/storages/sql.py

    r700 r705  
    1515# 
    1616# $Log$ 
     17# Revision 1.3  2003/02/05 23:00:12  jalet 
     18# Forgotten import 
     19# Bad datetime conversion 
     20# 
    1721# Revision 1.2  2003/02/05 22:28:38  jalet 
    1822# More robust storage 
     
    97101                 if softlimit <= pagecounter < hardlimit :     
    98102                     if datelimit is None : 
    99                          self.doQuery("UPDATE userpquota SET datelimit=%s WHERE userid=%s AND printerid=%s;" % ('%04i-%02i-%02i' % (now.year, now.month, now.day), self.doQuote(self.getUserId(username)), self.doQuote(self.getPrinterId(printername)))) 
     103                         self.doQuery("UPDATE userpquota SET datelimit=%s::DATETIME WHERE userid=%s AND printerid=%s;" % (self.doQuote("%04i-%02i-%02i %02i:%02i" % (now.year, now.month, now.day, now.hour, now.minute), self.doQuote(self.getUserId(username)), self.doQuote(self.getPrinterId(printername)))) 
    100104                         datelimit = now 
    101105                     if (now - datelimit) <= GRACEDELAY :