Skip to content

Commit 95387b3

Browse files
authored
Merge pull request #257 from learningequality/fix-new-job-timezone-awareness
Fix new job timezone awareness
2 parents 85f6c08 + 1587d52 commit 95387b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android_app_plugin/kolibri_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
2-
from datetime import datetime
32

3+
from django.utils import timezone
44
from jnius import autoclass
55
from kolibri.core.tasks.hooks import StorageHook
66
from kolibri.core.tasks.job import Priority
@@ -30,7 +30,7 @@ def schedule(
3030
if orm_job.id:
3131

3232
delay = (
33-
max(0, (orm_job.scheduled_time - datetime.now()).total_seconds())
33+
max(0, (orm_job.scheduled_time - timezone.now()).total_seconds())
3434
if orm_job.scheduled_time
3535
else 0
3636
)

0 commit comments

Comments
 (0)