Skip to content

AmbigousTimeError on DST end date #665

@mjl

Description

@mjl

This seems to haunt us every year. Obviously there's another place that does not catch the DST switch yet.

Traceback (most recent call last):
  File "/data/django/whatever/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
[...]
  File "/data/django/whatever/local/lib/python2.7/site-packages/feincms/utils/managers.py", line 56, in active
    return self.apply_active_filters(self)
  File "/data/django/whatever/local/lib/python2.7/site-packages/feincms/utils/managers.py", line 30, in apply_active_filters
    queryset = filt(queryset)
  File "/data/django/whatever/local/lib/python2.7/site-packages/feincms/module/extensions/datepublisher.py", line 117, in <lambda>
    Q(publication_date__lte=granular_now()) &
  File "/data/django/whatever/local/lib/python2.7/site-packages/feincms/module/extensions/datepublisher.py", line 65, in granular_now
    n.tzinfo)
  File "/data/django/whatever/local/lib/python2.7/site-packages/django/utils/timezone.py", line 358, in make_aware
    return timezone.localize(value, is_dst=None)
  File "/data/django/whatever/local/lib/python2.7/site-packages/pytz/tzinfo.py", line 349, in localize
    raise AmbiguousTimeError(dt)
AmbiguousTimeError: 2017-10-29 02:05:00

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions