I have model with DateTimeField column.
I'm try to insert row with database current_time value directly into table by sql query.
My sql query for MySQL database like:
INSERT INTO MyTable (..., my_datetime, ...) VALUES (..., current_time, ...)
And get:
RuntimeWarning: DateTimeField ModelName.field_name received a naive datetime (2014-01-09 22:16:23) while time zone support is active.
How to insert current time directly into table by sql query without warning?
now()
work well for me without warning. Thanks! – DoNotArrestMe