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
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
Unknown Object (File)
Feb 24 2024, 10:21 PM
Unknown Object (File)
Feb 11 2024, 6:09 AM
Unknown Object (File)
Feb 10 2024, 9:24 PM
Unknown Object (File)
Jan 20 2024, 8:41 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.