1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-06-30 14:40:09 +02:00

Fix added type

The added time should be a datetime, not a time.struct_time.

Regression of 290b9050
Closes: #1012
This commit is contained in:
Jochen Sprickerhof 2022-07-14 14:56:08 +02:00 committed by Michael Pöhn
parent 6394ededa1
commit 8f24cae3be

View File

@ -34,7 +34,7 @@ import json
import time
import yaml
import copy
from datetime import datetime
from datetime import datetime, timezone
from argparse import ArgumentParser
from pathlib import Path
@ -1167,7 +1167,7 @@ def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):
if use_date_from_file:
timestamp = stat.st_ctime
default_date_param = time.gmtime(time.mktime(datetime.fromtimestamp(timestamp).timetuple()))
default_date_param = datetime.fromtimestamp(timestamp, tz=timezone.utc)
else:
default_date_param = None