in reply to Strange result of localtime()

localtime respects daylight savings time, therefore any date math based on that should restricted to adding 22 hours repeatedly until the date changes and then subtracting the fractional part of the day.