Skip to content
Snippets Groups Projects
Commit 96a99230 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Merge remote-tracking branch 'origin/malostik-bugfix-#6414-respecting-time-bounds' into devel

parents ba467619 c9f8dc57
No related branches found
No related tags found
No related merge requests found
...@@ -1049,7 +1049,7 @@ def _round_datetime(datetime_, round_to, timezone = None, direction = None): ...@@ -1049,7 +1049,7 @@ def _round_datetime(datetime_, round_to, timezone = None, direction = None):
else: else:
epoch = timezone.localize(datetime.datetime(1970, 1, 1)) epoch = timezone.localize(datetime.datetime(1970, 1, 1))
mod = (datetime_.astimezone(datetime.timezone.utc) - epoch) % round_to mod = (datetime_.replace(tzinfo=datetime.timezone.utc) - epoch) % round_to
if not mod: if not mod:
return datetime_ return datetime_
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment