Update value_types.py

This commit is contained in:
Joakim Plate 2024-06-04 15:38:26 +02:00 committed by GitHub
parent b664c15977
commit 2d93a2648c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,7 @@ import pytz
# Preload timezone to avoid loading in event loop later # Preload timezone to avoid loading in event loop later
local_tz = pytz.timezone('Europe/Amsterdam') local_tz = pytz.timezone('Europe/Amsterdam')
def timestamp(value): def timestamp(value):
try: try:
naive_datetime = datetime.datetime.strptime(value[:-1], '%y%m%d%H%M%S') naive_datetime = datetime.datetime.strptime(value[:-1], '%y%m%d%H%M%S')