Revert "First steps into pytz deprecation"

This reverts commit e4e7d50659.
This commit is contained in:
Raphael Michel
2023-02-01 13:15:18 +01:00
parent e4e7d50659
commit 59d46ddded
63 changed files with 362 additions and 341 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 = ZoneInfo('Europe/Berlin')
utc = ZoneInfo('UTC')
today = datetime(2016, 10, 29, 12, 0, 0, tzinfo=tz).astimezone(utc)
tz = pytz.timezone('Europe/Berlin')
utc = pytz.timezone('UTC')
today = tz.localize(datetime(2016, 10, 29, 12, 0, 0)).astimezone(utc)
order = _create_order(event, email='dummy@example.org', positions=[],
now_dt=today,
payment_requests=[{