Skip to content

Commit 883b1f7

Browse files
committed
Indexer: Fix UTC datestamps
1 parent 73c3591 commit 883b1f7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

common/parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def _is_class(elem: bs4.element.Tag):
7373

7474

7575
def datestamp(timestamp: int | float):
76-
return int(dt.datetime.fromordinal(dt.datetime.fromtimestamp(timestamp).date().toordinal()).timestamp())
76+
utc_time = dt.datetime.fromtimestamp(timestamp, dt.UTC)
77+
utc_date = utc_time.replace(hour=12, minute=0, second=0, microsecond=0)
78+
return int(utc_date.timestamp())
7779

7880

7981
def attachment(preview: str):

0 commit comments

Comments
 (0)