TZOFFSETDIFF
Signed difference in minutes between two zones' offsets
Try it
When to use it
When should I use TZOFFSETDIFF instead of TZDIFF to compare two zone-aware times?
Use TZOFFSETDIFF when you want to know how many minutes one zone is ahead or behind another at a specific instant — for example, to display 'Berlin is 6 hours ahead of New York'. TZDIFF measures real elapsed time between two events; TZOFFSETDIFF measures only the offset gap between two zones.
What happens if both instants share the same UTC offset at that moment?
TZOFFSETDIFF returns 0. This can occur when two different named zones happen to have the same DST rule in effect at that instant, or when both zones are identical.
Can TZOFFSETDIFF return a negative number?
Yes. The result is signed: positive when zone A is ahead of zone B (further east or using DST while B does not), and negative when zone A is behind zone B.
Use cases
Check offset gap between Tokyo and London during European winter
Detect whether a US East Coast office is ahead or behind US West Coast
Used in
hr · operations · engineering
Syntax
TZOFFSETDIFF(zoned_a,zoned_b)