MCPcopy Create free account
hub / github.com/dateutil/dateutil / _fixed_offset_phantom_transition_zone

Function _fixed_offset_phantom_transition_zone

tests/test_tzfile.py:1090–1101  ·  view source on GitHub ↗

A zone with a phantom transition from UTC -> UTC.

()

Source from the content-addressed store, hash-verified

1088
1089 @add_cases
1090 def _fixed_offset_phantom_transition_zone():
1091 """A zone with a phantom transition from UTC -> UTC."""
1092 UTC = ZoneOffset("UTC", ZERO, ZERO)
1093
1094 transitions = [ZoneTransition(datetime(1970, 1, 1), UTC, UTC)]
1095
1096 after = "UTC0"
1097 zf = construct_zone(transitions, after)
1098 zi = tz.tzfile(zf, key="Etc/Phantom_UTC")
1099
1100 cases["offset"].append((datetime(2020, 1, 1, tzinfo=zi), UTC))
1101 cases["offset"].append((time(0, tzinfo=zi), UTC))
1102
1103 NORMAL = 0
1104 FOLD = 1

Callers

nothing calls this directly

Calls 4

ZoneOffsetClass · 0.85
ZoneTransitionClass · 0.85
construct_zoneFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected