Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions python-stdlib/datetime/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,15 +1645,15 @@ def test_fromtimestamp05(self):
self.assertTrue(ds.fold)

def test_fromtimestamp06(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 11, 1, 5, 30, tzinfo=timezone.utc)
ts = (dt - EPOCH).total_seconds()
dt = dt.replace(tzinfo=None) - 4 * td1h
ds = datetime.fromtimestamp(ts)
self.assertEqual(ds, dt)

def test_fromtimestamp07(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 11, 1, 7, 30, tzinfo=timezone.utc)
ts = (dt - EPOCH).total_seconds()
dt = dt.replace(tzinfo=None) - 5 * td1h
Expand Down Expand Up @@ -2110,22 +2110,22 @@ def test_timestamp05(self):
self.assertEqual(dt.timestamp(), 1288488600.0)

def test_timestamp06(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 3, 8, 2, 30) # doesn't exist
self.assertEqual(dt.timestamp(), 1583652600.0)

def test_timestamp07(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 8, 10, 2, 30)
self.assertEqual(dt.timestamp(), 1597041000.0)

def test_timestamp08(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 11, 1, 2, 30, fold=0)
self.assertEqual(dt.timestamp(), 1604215800.0)

def test_timestamp09(self):
with LocalTz("US/Eastern"):
with LocalTz("America/New_York"):
dt = datetime(2020, 11, 1, 2, 30, fold=1)
self.assertEqual(dt.timestamp(), 1604215800.0)

Expand Down
Loading