1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-01 00:30:13 +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 time
import yaml import yaml
import copy import copy
from datetime import datetime from datetime import datetime, timezone
from argparse import ArgumentParser from argparse import ArgumentParser
from pathlib import Path 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: if use_date_from_file:
timestamp = stat.st_ctime 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: else:
default_date_param = None default_date_param = None