Can't compare naive and aware datetime.now() <= challenge.datetime_end

后端 未结 9 1286
离开以前
离开以前 2020-12-02 07:58

I am trying to compare the current date and time with dates and times specified in models using comparison operators:

if challenge.datetime_start <= datet         


        
9条回答
  •  借酒劲吻你
    2020-12-02 08:47

    Do this in settings.py file :

    USE_TZ=False

    I was getting the same error, and it has resolved the error

提交回复
热议问题