mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 19:43:47 +00:00
Replace timezone.utc with timezone_utc.
This commit is contained in:
@@ -10,6 +10,7 @@ from datetime import timedelta
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.utils import timezone
|
||||
from django.utils.timezone import utc as timezone_utc
|
||||
from django.utils.dateparse import parse_datetime
|
||||
from django.conf import settings
|
||||
|
||||
@@ -58,7 +59,7 @@ class Command(BaseCommand):
|
||||
# type: (Dict[str, Any]) -> None
|
||||
fill_to_time = parse_datetime(options['time'])
|
||||
if options['utc']:
|
||||
fill_to_time = fill_to_time.replace(tzinfo=timezone.utc)
|
||||
fill_to_time = fill_to_time.replace(tzinfo=timezone_utc)
|
||||
|
||||
if fill_to_time.tzinfo is None:
|
||||
raise ValueError("--time must be timezone aware. Maybe you meant to use the --utc option?")
|
||||
|
||||
Reference in New Issue
Block a user