GMT offset code doesn't seem to work when the compensated time moves "past" midnight.
ThreeSixes opened this issue · 1 comments
ThreeSixes commented
Evaluate code for the problem as the GMT-compensated time crosses the int'l date line.
GMT: 21:48
Offset: GMT +5:30
Result: 04:18
Desired result: 03:18
ThreeSixes commented
A logical error was discovered in getCurrentTime() - we weren't properly adjusting the hours as the time zone calculator handled an offset that rolled over or under the int'l date line (midnight). We were subtracting or adding 23 hours, and for time zones that end in 30 minutes 59 minutes. We should have been adding/subtracting or adding 24 hours and 60 minutes, respectively.