Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b47913f5
Commit
b47913f5
authored
Dec 31, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #29123: Make CheckSqlTimestamp more robust
parent
b46ea903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Lib/sqlite3/test/types.py
Lib/sqlite3/test/types.py
+1
-2
No files found.
Lib/sqlite3/test/types.py
View file @
b47913f5
...
...
@@ -382,8 +382,7 @@ class DateTimeTests(unittest.TestCase):
@
unittest
.
skipIf
(
sqlite
.
sqlite_version_info
<
(
3
,
1
),
'the date functions are available on 3.1 or later'
)
def
CheckSqlTimestamp
(
self
):
# 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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment