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

Daylight savings bug #1

Open
NickSto opened this issue Mar 11, 2018 · 0 comments
Open

Daylight savings bug #1

NickSto opened this issue Mar 11, 2018 · 0 comments
Labels

Comments

@NickSto
Copy link
Owner

NickSto commented Mar 11, 2018

1520733615 INFO traffic.lib line  52 | Success getting IpInfo for [REDACTED]
1520733615 ERROR django.request line 132 | Internal Server Error: /traffic
Traceback (most recent call last):
  File "/var/www/nstoler.com/.venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/var/www/nstoler.com/.venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/www/nstoler.com/.venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "./traffic/views.py", line 112, in monitor
    'timezone': set_timezone(request),  # Set and retrieve timezone.
  File "./traffic/ipinfo.py", line 179, in set_timezone
    tz = get_tz_abbrv(ipinfo[0].timezone)
  File "./traffic/ipinfo.py", line 212, in get_tz_abbrv
    return tz.tzname(datetime.now())
  File "/var/www/nstoler.com/.venv/lib/python3.5/site-packages/pytz/tzinfo.py", line 485, in tzname
    dt = self.localize(dt, is_dst)
  File "/var/www/nstoler.com/.venv/lib/python3.5/site-packages/pytz/tzinfo.py", line 327, in localize
    raise NonExistentTimeError(dt)
pytz.exceptions.NonExistentTimeError: 2018-03-11 02:00:15.682729

Happened on the afternoon before daylight savings in March (at 18:00:15 PST on March 10, 2018 (1520733615)).
Apparently it's trying to compute some time in the nonexistent hour between 2AM and 3AM?
The IP address is my Sunnyvale Comcast one.

@NickSto NickSto added the bug label Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant