Pyzotero: a Python client for the Zotero API pyzotero.readthedocs.io
zotero

Try to fix timezone errors

+3 -3
+3 -3
src/pyzotero/zotero.py
··· 418 418 """ 419 419 # cache template and retrieval time for subsequent calls 420 420 try: 421 - thetime = whenever.ZonedDateTime.now("GMT").py_datetime() 421 + thetime = whenever.ZonedDateTime.now("Europe/London").py_datetime() 422 422 except AttributeError: 423 - thetime = whenever.ZonedDateTime.now("GMT").py_datetime() 423 + thetime = whenever.ZonedDateTime.now("Europe/London").py_datetime() 424 424 self.templates[key] = {"tmplt": response.json(), "updated": thetime} 425 425 return copy.deepcopy(response.json()) 426 426 ··· 540 540 # If the template is more than an hour old, try a 304 541 541 if ( 542 542 abs( 543 - whenever.ZonedDateTime.now("GMT").py_datetime() 543 + whenever.ZonedDateTime.now("Europe/London").py_datetime() 544 544 - self.templates[template]["updated"], 545 545 ).seconds 546 546 > ONE_HOUR