|
6 | 6 | from datetime import date |
7 | 7 | from datetime import datetime |
8 | 8 | from datetime import timedelta |
9 | | -from datetime import UTC |
| 9 | +from datetime import timezone |
10 | 10 | from decimal import Decimal |
11 | 11 | from uuid import UUID |
12 | 12 |
|
@@ -114,7 +114,7 @@ def _assert_match(self, record): |
114 | 114 | assert actual == expected |
115 | 115 |
|
116 | 116 | def test_datetime(self): |
117 | | - dt = datetime(2024, 6, 15, 12, 30, 45, tzinfo=UTC) |
| 117 | + dt = datetime(2024, 6, 15, 12, 30, 45, tzinfo=timezone.utc) |
118 | 118 | record = make_zodb_record("myapp", "Obj", {"created": dt}) |
119 | 119 | self._assert_match(record) |
120 | 120 |
|
@@ -143,7 +143,7 @@ def test_uuid(self): |
143 | 143 | def test_mixed_types(self): |
144 | 144 | state = { |
145 | 145 | "title": "Test", |
146 | | - "created": datetime(2024, 1, 1, tzinfo=UTC), |
| 146 | + "created": datetime(2024, 1, 1, tzinfo=timezone.utc), |
147 | 147 | "score": Decimal("3.14"), |
148 | 148 | "tags": frozenset(["a", "b"]), |
149 | 149 | "coords": (1.0, 2.0), |
|
0 commit comments