diff --git a/src/eatery/serializers.py b/src/eatery/serializers.py index 25883a1..dbe4c0d 100644 --- a/src/eatery/serializers.py +++ b/src/eatery/serializers.py @@ -57,6 +57,10 @@ def get_events(self, obj): day = now.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(days=day_offset) day_unix = int(day.timestamp()) day_end_unix = int((day + timedelta(days=1)).timestamp()) + print(f"Now: {now}") + print(f"Day: {day}") + print(f"Day Unix: {day_unix}") + print(f"Day End Unix: {day_end_unix}") events = Event.objects.filter(eatery=obj.id, start__gte=day_unix, start__lt=day_end_unix) serializer = EventSerializerOptimized(instance=events, many=True) return serializer.data