Fix wrong utc timestamp in tag expiration view
* changed expiration date response to parse UTC timestamp from the database. This problem only happens when testing using Sqlite.
This commit is contained in:
parent
3e63b08731
commit
d30045a424
1 changed files with 2 additions and 2 deletions
|
@ -35,11 +35,11 @@ def _tag_dict(tag):
|
|||
tag_info['size'] = tag.legacy_image.aggregate_size
|
||||
|
||||
if tag.lifetime_start_ts > 0:
|
||||
last_modified = format_date(datetime.fromtimestamp(tag.lifetime_start_ts))
|
||||
last_modified = format_date(datetime.utcfromtimestamp(tag.lifetime_start_ts))
|
||||
tag_info['last_modified'] = last_modified
|
||||
|
||||
if tag.lifetime_end_ts is not None:
|
||||
expiration = format_date(datetime.fromtimestamp(tag.lifetime_end_ts))
|
||||
expiration = format_date(datetime.utcfromtimestamp(tag.lifetime_end_ts))
|
||||
tag_info['expiration'] = expiration
|
||||
|
||||
return tag_info
|
||||
|
|
Reference in a new issue