# 为什么我的数据值仅在晚上7点以后才移动24小时？

{'Hour': 18, 'Monday': 235, 'Tuesday': 0, 'Friday': 0, 'Wednesday': 0, 'Thursday': 0, 'Sunday': 163, 'Saturday': 0}
{'Hour': 19, 'Monday': 127, 'Tuesday': 226, 'Friday': 0, 'Wednesday': 0, 'Thursday': 0, 'Sunday': 0, 'Saturday': 0}

{'Hour': 19, 'Monday': 127, 'Tuesday': 226, 'Friday': 0, 'Wednesday': 0, 'Thursday': 0, 'Sunday': 0, 'Saturday': 0}

#results filtered by appropriate gender and hour
ordered_query = initial_query.annotate(
Hour=ExtractHour('actualdatetime', tzinfo=eastern),
).values(
'Hour'
).annotate(
Sunday=Coalesce(Sum(Case(When(actualdatetime__week_day=1, then=1)), output_field=IntegerField()), Value(0)),
Monday=Coalesce(Sum(Case(When(actualdatetime__week_day=2, then=1)), output_field=IntegerField()), Value(0)),
Tuesday=Coalesce(Sum(Case(When(actualdatetime__week_day=3, then=1)), output_field=IntegerField()), Value(0)),
Wednesday=Coalesce(Sum(Case(When(actualdatetime__week_day=4, then=1)), output_field=IntegerField()), Value(0)),
Thursday=Coalesce(Sum(Case(When(actualdatetime__week_day=5, then=1)), output_field=IntegerField()), Value(0)),
Friday=Coalesce(Sum(Case(When(actualdatetime__week_day=6, then=1)), output_field=IntegerField()), Value(0)),
Saturday=Coalesce(Sum(Case(When(actualdatetime__week_day=7, then=1)), output_field=IntegerField()), Value(0)),
).values(
'Hour', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
)

#populate list of dictionaries
for item in ordered_query:
tableData[item["Hour"]]["Sunday"] = item["Sunday"]
tableData[item["Hour"]]["Monday"] = item["Monday"]
tableData[item["Hour"]]["Tuesday"] = item["Tuesday"]
tableData[item["Hour"]]["Wednesday"] = item["Wednesday"]
tableData[item["Hour"]]["Thursday"] = item["Thursday"]
tableData[item["Hour"]]["Friday"] = item["Friday"]
tableData[item["Hour"]]["Saturday"] = item["Saturday"]