R
R
redduckrobot2016-02-23 01:36:03
Django
redduckrobot, 2016-02-23 01:36:03

Why is time not filtered correctly?

Hello, I'm using the following filter:

Date.objects.filter(date_scan__range=['2016-02-23', '2016-02-24'])

As a result, I get from 22 to 23 numbers, similarly with this filter: And if, put from 24-25 (there is no data for the 25th yet), then an empty list is returned. Can you please tell me why it works this way and how can I overcome it?
filter(date_scan__gte=datetime.date(2016, 2, 23))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oscar Django, 2016-02-23
@redduckrobot

Look here djbook.ru/rel1.8/topics/i18n/timezones.html#troubl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question