mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
First steps into pytz deprecation
This commit is contained in:
@@ -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=[{
|
||||
|
||||
Reference in New Issue
Block a user