We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73c3591 commit 883b1f7Copy full SHA for 883b1f7
1 file changed
common/parser.py
@@ -73,7 +73,9 @@ def _is_class(elem: bs4.element.Tag):
73
74
75
def datestamp(timestamp: int | float):
76
- return int(dt.datetime.fromordinal(dt.datetime.fromtimestamp(timestamp).date().toordinal()).timestamp())
+ 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())
79
80
81
def attachment(preview: str):
0 commit comments