orders = Order.objects.filter(date__range=[datetime.datetime.now(), datetime.timedelta(days=1)])
나는 이것이 정확히 내가 원하는하지 않습니다 추측
,하지만 난 내 파이썬 쉘에이를 입력 할 때 내가이 경고가 계속 필터링하는 방법.오늘 생성 된 객체 (장고)
RuntimeWarning: DateTimeField received a naive datetime (2012-08-26 02:03:25.614372) while time zone support is active.
[수입 날짜] 가 [django.utils.timezone 수입 UTC에서] [지금 = datetime.datetime.utcnow(). (= UTC tzinfo) 교체] 는 이렇게 말해,하지만 어떻게 할 수 나는 시간대를 태평양 표준시로 만들까요? – anc1revv
'pytz'가 설치되어 있다면,'import pytz tz = pytz.timezone ('US/PST')' – Rohan