From 577dbcbb4f46df02e1f85179798a1079733c5a97 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 24 Oct 2022 09:11:48 +0200 Subject: [PATCH] Refs #34070 -- Fixed date format in Now() on SQLite. Regression in 649b28eab6765cd6b2b40c779a18ecafc99b43d7. --- django/db/models/functions/datetime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/functions/datetime.py b/django/db/models/functions/datetime.py index 939fa656d7..02d92a9a07 100644 --- a/django/db/models/functions/datetime.py +++ b/django/db/models/functions/datetime.py @@ -232,7 +232,7 @@ class Now(Func): return self.as_sql( compiler, connection, - template="STRFTIME('%%Y-%%m-%%d %%H:%%M:%%f', 'NOW')", + template="STRFTIME('%%%%Y-%%%%m-%%%%d %%%%H:%%%%M:%%%%f', 'NOW')", **extra_context, )