From: Berker Peksag Date: Sat, 31 Dec 2016 23:51:46 +0000 (+0300) Subject: Issue #29123: Make CheckSqlTimestamp more robust X-Git-Tag: v2.7.14rc1~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c644d53acfa0e4f1fe470430e15e69717da4f264;p=thirdparty%2FPython%2Fcpython.git Issue #29123: Make CheckSqlTimestamp more robust --- diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py index a31446eaa6b6..fdc21aee72a0 100644 --- a/Lib/sqlite3/test/types.py +++ b/Lib/sqlite3/test/types.py @@ -383,8 +383,7 @@ class DateTimeTests(unittest.TestCase): if sqlite.sqlite_version_info < (3, 1): return - # SQLite's current_timestamp uses UTC time, while datetime.datetime.now() uses local time. - now = datetime.datetime.now() + now = datetime.datetime.utcnow() self.cur.execute("insert into test(ts) values (current_timestamp)") self.cur.execute("select ts from test") ts = self.cur.fetchone()[0]