summaryrefslogtreecommitdiff
path: root/django/db/models/functions/datetime.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/functions/datetime.py')
-rw-r--r--django/db/models/functions/datetime.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/django/db/models/functions/datetime.py b/django/db/models/functions/datetime.py
index 20161bef38..07f884f78d 100644
--- a/django/db/models/functions/datetime.py
+++ b/django/db/models/functions/datetime.py
@@ -188,7 +188,9 @@ class TruncBase(TimezoneMixin, Transform):
kind = None
tzinfo = None
- def __init__(self, expression, output_field=None, tzinfo=None, is_dst=None, **extra):
+ # RemovedInDjango50Warning: when the deprecation ends, remove is_dst
+ # argument.
+ def __init__(self, expression, output_field=None, tzinfo=None, is_dst=timezone.NOT_PASSED, **extra):
self.tzinfo = tzinfo
self.is_dst = is_dst
super().__init__(expression, output_field=output_field, **extra)
@@ -264,7 +266,9 @@ class TruncBase(TimezoneMixin, Transform):
class Trunc(TruncBase):
- def __init__(self, expression, kind, output_field=None, tzinfo=None, is_dst=None, **extra):
+ # RemovedInDjango50Warning: when the deprecation ends, remove is_dst
+ # argument.
+ def __init__(self, expression, kind, output_field=None, tzinfo=None, is_dst=timezone.NOT_PASSED, **extra):
self.kind = kind
super().__init__(
expression, output_field=output_field, tzinfo=tzinfo,