Time zone difference calculator
Time zone arithmetic is addition modulo 24, plus a date rollover when it wraps.
hours
hours
Time in the first zone
9:30:00
- Time in the second zone
- 20:00:00
- Second zone is ahead by
- 10.50 hours
- First zone date shift
- 0
- Second zone date shift
- 0
- They are on different dates
- 0
Show the working
- UTC hour = 14
- Minute = 30
- First zone offset = -5
- Second zone offset = 5.5
- utc_decimal = 14 + 30/60 = 14.5
- a_decimal = mod(14.5 + -5, 24) = 9.5
- b_decimal = mod(14.5 + 5.5, 24) = 20
- Time in the first zone = 9.5 * 3600 = 34 200
- Time in the second zone = 20 * 3600 = 72 000
- Second zone is ahead by = 5.5 - -5 = 10.5
- First zone date shift = floor((14.5 + -5)/24) = 0
- Second zone date shift = floor((14.5 + 5.5)/24) = 0
- They are on different dates = 0 != 0 ? 1 : 0 = 0
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- local time = UTC + offset, modulo 24