pytz.exceptions.AmbiguousTimeError: 2017-10-29 02:00:00
additional_data = query \
.annotate(
hour=TruncHour(
'datetime',
tzinfo=pytz.timezone(thermostat.structure.timezone),
output_field=DateTimeField())) \
.values('hour') \
.annotate(
heat=Avg(Case(When(heating=True, then=1), default=0), output_field=FloatField()),
cool=Avg(Case(When(cooling=True, then=1), default=0), output_field=FloatField())) \
.values(
'hour',
'heat',
'cool')
Do you have some ideas how I could workaround this issue?