Working on improving zoneinfo support in pandas, I want to check for 
non-existent datetimes.  e.g.

```
from datetime import datetime, timezone
import zoneinfo

tz = zoneinfo.ZoneInfo("US/Pacific")

dt = datetime(2014, 3, 9, 2, tzinfo=tz)   # <- want to tell if this exists

roundtrip = dt.astimezone(timezone.utc).astimezone(tz)

if roundtrip != dt:
     raise ValueError("Nonexistent!")
```

Is checking for round-tripping a) correct and b) the suggested way of doing 
this?
_______________________________________________
Datetime-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/datetime-sig.python.org/
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to