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
F13046454: D19873.id.diff
Thu, Apr 18, 9:53 AM
F13045246: D19873.diff
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 3, 1:32 AM
Unknown Object (File)
Sun, Mar 31, 3:35 PM
Unknown Object (File)
Tue, Mar 19, 11:01 PM
Unknown Object (File)
Tue, Mar 19, 11:01 PM
Unknown Object (File)
Tue, Mar 19, 11:01 PM
Unknown Object (File)
Tue, Mar 19, 11:00 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
Branch
tz-fun (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21310
Build 28994: Run Core Tests
Build 28993: arc lint + arc unit

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.