Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Timezone offset does not match system offset #1

Closed
zhangt58 opened this issue Jan 25, 2022 · 1 comment
Closed

ValueError: Timezone offset does not match system offset #1

zhangt58 opened this issue Jan 25, 2022 · 1 comment

Comments

@zhangt58
Copy link
Owner

zhangt58 commented Jan 25, 2022

Happens when importing archappl.

>>> import archappl
[15:34:35.101] WARNING: archappl: Not running in Jupyter Notebook
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/archappl/__init__.py", line 58, in <module>
    from archappl.client import *
  File "/usr/lib/python3/dist-packages/archappl/client/__init__.py", line 2, in <module>
    from archappl.data import ArchiverDataClient
  File "/usr/lib/python3/dist-packages/archappl/data/__init__.py", line 1, in <module>
    from .client import ArchiverDataClient
  File "/usr/lib/python3/dist-packages/archappl/data/client.py", line 8, in <module>
    from .utils import LOCAL_ZONE_NAME
  File "/usr/lib/python3/dist-packages/archappl/data/utils.py", line 12, in <module>
    LOCAL_ZONE = tzlocal.get_localzone()
  File "/usr/lib/python3/dist-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/usr/lib/python3/dist-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
 File "/usr/lib/python3/dist-packages/tzlocal/utils.py", line 46, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: 0 != -18000. Please, check your config files.
@zhangt58
Copy link
Owner Author

Either solution below should fix the issue:

  • sudo dpkg-reconfigure tzdata
  • export TZ="/usr/share/zoneinfo/America/New_York" # or other zoneinfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant