Skip to content

Commit

Permalink
Pelican QuickStart: Address tzlocal API change (#3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mome authored Aug 8, 2023
1 parent 63b60da commit 0d1bcd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pelican/tools/pelican_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

try:
import tzlocal
_DEFAULT_TIMEZONE = tzlocal.get_localzone().zone
if hasattr(tzlocal.get_localzone(), "zone"):
_DEFAULT_TIMEZONE = tzlocal.get_localzone().zone
else:
_DEFAULT_TIMEZONE = tzlocal.get_localzone_name()
except ModuleNotFoundError:
_DEFAULT_TIMEZONE = "Europe/Rome"

Expand Down

0 comments on commit 0d1bcd4

Please sign in to comment.