I just found a bug in my code, due to me not explicitly setting tm_isdst to -1 when updating the time using mktime. It took me a long time to detect, since I live in Arizona, and we don’t observe DST. Changing the time update routine to have tm_isdst = -1 seems to fix the time update issue I was having in other timezones. But, after reading up on what this field does, a number of people have posted that during the ST->DST and DST->ST transitions, what mktime does is undefined (or at least poorly defined). So, I am curious - does anyone know what mktime and tm_isdst = -1 does during the 1 hour of uncertainty?
BTW, a lot of people suggest simply avoiding the problem by not changing the time during those two uncertain times, but this is an embedded system, and the time may get updated automatically via cellular modem, so I would like to know what to expect.