fix: use utc for time parse in sqlite

This commit is contained in:
arkohut 2024-10-10 15:31:20 +08:00
parent 782e813826
commit 6308b95784

View File

@ -443,7 +443,7 @@ def full_text_search(
sql_query += f" AND entities.library_id IN ({library_ids_str})"
if start is not None and end is not None:
sql_query += (
" AND strftime('%s', entities.file_created_at) BETWEEN :start AND :end"
" AND strftime('%s', entities.file_created_at, 'utc') BETWEEN :start AND :end"
)
params["start"] = str(start)
params["end"] = str(end)