Skip to content

Commit 71413b7

Browse files
committed
save date_created as timezone-aware
1 parent b15adf4 commit 71413b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_celery_results/backends/database.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from ..models import ChordCounter
1616
from ..models import GroupResult as GroupResultModel
1717
from ..models import TaskResult
18+
from ..utils import now
1819

1920
EXCEPTIONS_TO_CATCH = (InterfaceError,)
2021

@@ -146,7 +147,7 @@ def _store_result(
146147
)
147148

148149
if status == states.STARTED:
149-
task_props['date_started'] = Now()
150+
task_props['date_started'] = now()
150151

151152
self.TaskModel._default_manager.store_result(**task_props)
152153
return result

0 commit comments

Comments
 (0)