Skip to content

Commit

Permalink
watch for match syntax for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
glow-mdsol committed Jul 16, 2024
1 parent 66492c3 commit 542618e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rwslib/builders/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ def get_utc_date() -> datetime.datetime:
"""
Returns the UTC date as datetime.datetime object.
"""
match platform.python_version_tuple():
case ("3", "10", _):
utc_date = datetime.datetime.utcnow()
case _:
utc_date = datetime.datetime.now(datetime.UTC)
version = platform.python_version_tuple()
if int(version[1]) < 11:
utc_date = datetime.datetime.utcnow()
else:
utc_date = datetime.datetime.now(datetime.UTC)
return utc_date


Expand Down

0 comments on commit 542618e

Please sign in to comment.