Show
Ignore:
Timestamp:
06/20/06 23:01:00 (18 years ago)
Author:
jerome
Message:

Fixed date formatting problems with MySQL.

Files:
1 modified

Legend:

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

    r2909 r2953  
    241241                        else :     
    242242                            billingcode_url = None 
     243                        curdate = DateTime.ISO.ParseDateTime(str(job.JobDate)) 
    243244                        self.report.append('<tr class="%s">%s</tr>' % \ 
    244245                                              (oddevenclass, \ 
    245246                                               "".join(["<td>%s</td>" % (h or "&nbsp;") \ 
    246                                                   for h in (str(job.JobDate[:19]), \ 
     247                                                  for h in (str(curdate)[:19], \ 
    247248                                                            _(job.JobAction), \ 
    248249                                                            username_url, \ 
     
    264265                                                            job.JobPages)]))) 
    265266                    self.report.append('</table>') 
    266                     d = DateTime.ISO.ParseDateTime(str(job.JobDate)) 
    267267                    dico = { "history" : 1, 
    268                              "datelimit" : "%04i%02i%02i %02i:%02i:%02i" % (d.year, d.month, d.day, d.hour, d.minute, d.second), 
     268                             "datelimit" : "%04i-%02i-%02i %02i:%02i:%02i" \ 
     269                                                         % (curdate.year, \ 
     270                                                            curdate.month, \ 
     271                                                            curdate.day, \ 
     272                                                            curdate.hour, \ 
     273                                                            curdate.minute, \ 
     274                                                            curdate.second), 
    269275                           } 
    270276                    if user and user.Exists :