1. Jackson Nixon
  2. drivcenDRIVENvpackager


Moises Henriquez  committed 5139163

Fixed sqlite timestamp out of sync bug

  • Participants
  • Parent commits 6cb1274
  • Branches default

Comments (0)

Files changed (1)

File src/vpackager/dbutils.py

View file
         create table history(id integer primary key,
         app text, ver text, srcURI text, descURI text,
         release text, type text, config_options text,
-        doinstURI text, patches text, buildstart text,
-        buildend text, stdout text, result text)''')
+        doinstURI text, patches text, buildstart timestamp,
+        buildend timestamp, stdout text, result text)''')
         return self.close()
         insert into history (id, app, ver, srcURI, descURI, release, type,
         config_options, doinstURI, buildstart, result)
-        values (?,?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP, 'Running')''', res)
+        values (?,?,?,?,?,?,?,?,?,datetime(CURRENT_TIMESTAMP, 'localtime'), 'Running')''', res)
         cursor.execute('delete from queue where id=?', t)
         # Notify the observers of the changes.
         db, cursor = self._open()
         t = (stdoutpath, result, job_id)
-            UPDATE history SET buildend=CURRENT_TIMESTAMP,
+            UPDATE history SET buildend=datetime(CURRENT_TIMESTAMP, 'localtime'),
             stdout=?, result=? WHERE id=?''', t)
         self.notify(data = self.GetHistory(), group='history')