Today is the day we "spring forward" our clocks in most of the US, that day may be different or nonexistent in your locale, and it's always changing (for example, last year we here in California voted to stay on Daylight Saving Time permanently year-round, but are waiting for federal approval before implementing it).
I'm working on an app that makes decisions based on the time and the rather naive assumption that a 24-hour day is a constant (on DST days it turns out to be either 23 or 25). Based on my implementation, springing-forward won't harm my functionality, but falling-back will.
On November 3 at 2 am, it becomes 1 am again. And for an hour my app will make the wrong decisions.
Basically for every event that occurs between 1:00:00 and 1:59:59 I need to be able to determine if it's the first 1:00-hour or the second 1:00-hour. I can not assume that my app will be running 24/7 so it's not as simple as polling time and setting a flag when 1:00 rolls around.
I'm struggling to come up with a simple way to determine this without some really crazy underlying engine changes and refactoring the entire way I handle time. That much work might just lead to me abandoning the project. Just wondering if there's an easy way to figure it out.
Thanks in advance for any ideas!