Page MenuHomePhabricator

Show more of UTC offset when user's TZ is not an integer number of hours offset
ClosedPublic

Authored by amckinley on Dec 12 2018, 9:20 PM.
Tags
None
Referenced Files
F18796261: D19873.id47460.diff
Fri, Oct 17, 3:12 AM
F18796255: D19873.id47459.diff
Fri, Oct 17, 3:10 AM
F18782099: D19873.id47458.diff
Mon, Oct 13, 12:35 AM
F18754910: D19873.id47461.diff
Sun, Oct 5, 2:23 AM
F18749574: D19873.id47459.diff
Sat, Oct 4, 4:19 AM
F18683136: D19873.id47460.diff
Fri, Sep 26, 7:15 AM
F18644261: D19873.diff
Sep 19 2025, 4:34 AM
F18624303: D19873.diff
Sep 15 2025, 7:30 PM
Subscribers

Details

Summary

See https://discourse.phabricator-community.org/t/personal-timezone-setting-mismatch-cleared-and-more-specific-cases/1680. The code has always worked correctly, but the resulting timezone mismatch warning messsage wasn't specific enough when the mismatch is by a non-integer number of hours.

Test Plan

Set timezone locally to Asia/Vladivostok and in Phabricator to Australia/Adelaide (which as of today's date are 30 minutes apart) and observed a more precise error message: F6061330

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I didn't know about %+, neat.

src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
119

Maybe this should be %+0.2f since 3h 15m will render as 3.2 or 3.3 right now.

Or maybe (something like) %+d:%02d with the remainder, so we get +3:15, +3:30 and +3:45 instead of +3.25, +3.5 and +3.75 -- that seems marginally clearer?

This revision is now accepted and ready to land.Dec 12 2018, 9:47 PM

Change format string to match "hours:minutes", rename variables for clarity.

This revision was automatically updated to reflect the committed changes.