mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update pelican_quickstart.py
Fixes bug of missing zone attribute caused by tzlocal 4.0 API change.
This commit is contained in:
parent
69d2b5b9af
commit
7bd775b9bc
1 changed files with 4 additions and 1 deletions
|
|
@ -16,7 +16,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 ImportError:
|
||||
_DEFAULT_TIMEZONE = 'Europe/Rome'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue