First steps into pytz deprecation

This commit is contained in:
Raphael Michel
2023-02-01 13:12:24 +01:00
parent 1d46a96821
commit e4e7d50659
63 changed files with 341 additions and 362 deletions

View File

@@ -22,9 +22,9 @@
import json
from datetime import datetime, timedelta
from decimal import Decimal
from zoneinfo import ZoneInfo
import pytest
import pytz
from django.core import mail as djmail
from django.db.models import F, Sum
from django.test import TestCase
@@ -255,9 +255,9 @@ def test_expiry_last_relative_subevents(event):
@pytest.mark.django_db
def test_expiry_dst(event):
event.settings.set('timezone', 'Europe/Berlin')
tz = pytz.timezone('Europe/Berlin')
utc = pytz.timezone('UTC')
today = tz.localize(datetime(2016, 10, 29, 12, 0, 0)).astimezone(utc)
tz = ZoneInfo('Europe/Berlin')
utc = ZoneInfo('UTC')
today = datetime(2016, 10, 29, 12, 0, 0, tzinfo=tz).astimezone(utc)
order = _create_order(event, email='dummy@example.org', positions=[],
now_dt=today,
payment_requests=[{