mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Pelican QuickStart: Address tzlocal API change (#3155)
This commit is contained in:
parent
63b60da919
commit
0d1bcd4b11
1 changed files with 4 additions and 1 deletions
|
|
@ -19,7 +19,10 @@ except ImportError:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import tzlocal
|
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:
|
except ModuleNotFoundError:
|
||||||
_DEFAULT_TIMEZONE = "Europe/Rome"
|
_DEFAULT_TIMEZONE = "Europe/Rome"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue