mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03: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:
parent
6394ededa1
commit
8f24cae3be
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue