Changeset 2266 for pykota/trunk/cgi-bin

Show
Ignore:
Timestamp:
05/21/05 00:40:21 (19 years ago)
Author:
jerome
Message:

Now dumpykota and dumpykota.cgi accept start= and end=
to specify the starting and ending dates when dumping the
history.
Syntax allowed is :

start|end=YYYY[MM[DD[hh[mm[ss]]]]]

and this is REALLY powerful !

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/printquota.cgi

    r2265 r2266  
    2929import cgi 
    3030import urllib 
     31 
     32from mx import DateTime 
    3133 
    3234from pykota import version 
     
    203205                    billingcode = None 
    204206                self.report = ["<h2>%s</h2>" % _("History")]     
    205                 history = self.storage.retrieveHistory(user, printer, datelimit, hostname, billingcode) 
     207                history = self.storage.retrieveHistory(user, printer, hostname, billingcode, end=datelimit) 
    206208                if not history : 
    207209                    self.report.append("<h3>%s</h3>" % _("Empty")) 
     
    257259                                                            job.JobPages)]))) 
    258260                    self.report.append('</table>') 
     261                    d = DateTime.ISO.ParseDateTime(job.JobDate)        
    259262                    dico = { "history" : 1, 
    260                              "datelimit" : job.JobDate, 
     263                             "datelimit" : "%04i%02i%02i %02i:%02i:%02i" % (d.year, d.month, d.day, d.hour, d.minute, d.second), 
    261264                           } 
    262265                    if user and user.Exists :