Skip to content
Snippets Groups Projects
Commit 283595fd authored by Andreas Valder's avatar Andreas Valder
Browse files

fixed datetime wraper for sqlite, closes #45

parent 399a086d
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ if config['DB_ENGINE'] == 'sqlite': ...@@ -13,7 +13,7 @@ if config['DB_ENGINE'] == 'sqlite':
hours, minutes, seconds = map(int, timepart_full[0].split(b":")) hours, minutes, seconds = map(int, timepart_full[0].split(b":"))
val = datetime(year, month, day, hours, minutes, seconds, 0) val = datetime(year, month, day, hours, minutes, seconds, 0)
except ValueError: except ValueError:
val = None val = datetime.fromtimestamp(0)
return val return val
sqlite3.register_converter('datetime', convert_timestamp) sqlite3.register_converter('datetime', convert_timestamp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment