Exemplo n.º 1
0
 def CheckDateTimeMiliSeconds(self):
     ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 500000)
     self.cur.execute(
         "insert into test(ts) values ('2004-02-14 07:15:00.500')")
     self.cur.execute("select ts from test")
     ts2 = self.cur.fetchone()[0]
     self.assertEqual(ts, ts2)
Exemplo n.º 2
0
 def CheckTimestamp(self):
     ts = sqlite.Timestamp(2004, 10, 28, 12, 39, 35)
Exemplo n.º 3
0
 def CheckDateTimeSubSecondsFloatingPoint(self):
     ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 510241)
     self.cur.execute("insert into test(ts) values (?)", (ts, ))
     self.cur.execute("select ts from test")
     ts2 = self.cur.fetchone()[0]
     self.failUnlessEqual(ts, ts2)
Exemplo n.º 4
0
 def CheckSqliteTimestamp(self):
     ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0)
     self.cur.execute("insert into test(ts) values (?)", (ts, ))
     self.cur.execute("select ts from test")
     ts2 = self.cur.fetchone()[0]
     self.failUnlessEqual(ts, ts2)
Exemplo n.º 5
0
 def CheckDateTimeMicroseconds(self):
     ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 500000)
     self.cur.execute("insert into test(ts) values (?)", (ts, ))
     self.cur.execute("select ts from test")
     ts2 = self.cur.fetchone()[0]
     self.assertEqual(ts, ts2)