mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
Minor nitpicks in the fronthistory command
This commit is contained in:
parent
292528ae47
commit
345e8baab6
2 changed files with 18 additions and 11 deletions
|
|
@ -11,7 +11,8 @@ from pluralkit.errors import InvalidAvatarURLError
|
|||
|
||||
|
||||
def fix_time(time: datetime):
|
||||
# Assume we're receiving a naive datetime set to UTC, returns naive time zone set to local
|
||||
"""Convert a naive datetime from UTC to local time. humanize's methods expect a local naive time and not a time in UTC."""
|
||||
# TODO: replace with methods that call humanize directly, to hide implementation details
|
||||
return time.replace(tzinfo=timezone.utc).astimezone().replace(tzinfo=None)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue