use tzutc from dateutil
This commit is contained in:
parent
d05b0a4de1
commit
adda405314
1 changed files with 2 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ import time
|
|||
import traceback
|
||||
|
||||
import psycopg2
|
||||
from dateutil.tz import tzutc
|
||||
|
||||
import koji.context
|
||||
context = koji.context.context
|
||||
|
|
@ -302,7 +303,7 @@ def _singleRow(query, values, fields, strict=False):
|
|||
|
||||
def convert_timestamp(ts):
|
||||
"""Convert a numeric timestamp to a string suitable for a datetimetz field"""
|
||||
return datetime.datetime.fromtimestamp(ts, datetime.timezone.utc).isoformat(' ')
|
||||
return datetime.datetime.fromtimestamp(ts, tzutc()).isoformat(' ')
|
||||
|
||||
|
||||
def get_event():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue