Converting a potential DST datetime to “normal” time when DST ends
I’m implementing conversion functions to and from DST datetimes. I have knowledge of when DST starts and ends. Going from “normal” time to DST is easy enough. Just add an hour to the normal time, essentially skipping that hour (e.g. from 2:00 AM to 3:00 AM). However, going the other way, from DST back to “normal” time, causes me lots of headaches.