Pelican QuickStart: Address tzlocal API change (#3155)

This commit is contained in:
Moritz Meier 2023-08-08 09:21:10 +02:00 committed by GitHub
commit 0d1bcd4b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,10 @@ except ImportError:
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"