Changeset 3121

Show
Ignore:
Timestamp:
12/04/06 21:46:32 (17 years ago)
Author:
jerome
Message:

Fixed localized month problem in data dumper with CUPS format.

Files:
1 modified

Legend:

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

    r3093 r3121  
    244244    def dumpCups(self, allentries, dummy) :     
    245245        """Dumps history datas as CUPS' page_log format.""" 
     246        months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ] 
    246247        entries = allentries[0] 
    247248        fieldnames = entries[0] 
     
    258259            jobdate = DateTime.ISO.ParseDateTime(str(entry[fields["jobdate"]])[:19]) 
    259260            gmtoffset = jobdate.gmtoffset() 
    260             jobdate = "%s %+03i00" % (jobdate.strftime("%d/%b/%Y:%H:%M:%S"), gmtoffset.hour) 
     261            #jobdate = "%s %+03i00" % (jobdate.strftime("%d/%b/%Y:%H:%M:%S"), gmtoffset.hour) 
     262            jobdate = "%02i/%s/%04i:%02i:%02i:%02i %+03i%02i" % (jobdate.day, 
     263                                                                 months[jobdate.month - 1], 
     264                                                                 jobdate.year, 
     265                                                                 jobdate.hour, 
     266                                                                 jobdate.minute, 
     267                                                                 jobdate.second, 
     268                                                                 gmtoffset.hour, 
     269                                                                 gmtoffset.minute) 
    261270            jobsize = entry[fields["jobsize"]] or 0 
    262271            copies = entry[fields["copies"]] or 1