applets/digital-clock: fix timezone offset
Original commit message(s)
- applets/digital-clock: fix timezone offset
formatOffset() used a floored signed offset to calculate hours, but used a signed modulo to calculate minutes. This produced invalid output for negative offsets with a minute component, such as "2:-30 earlier" for a -90 minute offset.
Calculate both components from the absolute offset while retaining the original sign to choose between "earlier" and "later".
BUG: 522037 FIXED-IN: 6.7.3
Reason for the change
The widget wrongly displayed negative offsets with fractional hours.
Test plan
- Set the system time zone to UTC+07:00 or to any time zone ahead of IST.
- Add Asia/Kolkata (IST, UTC+05:30) as an additional Digital Clock timezone.
- Open the clock tooltip.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
Bugs fixed
BUG: 522037 FIXED-IN: 6.7.3
Edited by Nate Graham

