Skip to content

Commit

Permalink
another minor datetime_utils fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Nov 17, 2024
1 parent 150a9e5 commit 31556bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcicutils/datetime_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,12 @@ def format_datetime(value: datetime,
if utc is True:
tz = timezone.utc
elif not isinstance(tz, timezone):
tz = get_local_timezone()
if tz is True:
notz = False
tz = get_local_timezone()
elif tz is False:
notz = True
tz = get_local_timezone()
if noseconds is True:
ms = False
value = value.astimezone(tz)
Expand Down

0 comments on commit 31556bf

Please sign in to comment.