diff --git a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php index 2e2e174e0f..51f1747b9f 100644 --- a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php +++ b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php @@ -63,7 +63,7 @@ final class PhabricatorSettingsTimezoneController $server_offset = $viewer->getTimeZoneOffset(); - if ($client_offset == $server_offset || $did_calibrate) { + if (($client_offset == $server_offset) || $did_calibrate) { return $this->newDialog() ->setTitle(pht('Timezone Calibrated')) ->appendParagraph( @@ -113,12 +113,13 @@ final class PhabricatorSettingsTimezoneController } private function formatOffset($offset) { - $offset = $offset / 60; - - if ($offset >= 0) { - return pht('UTC-%d', $offset); + $hours = $offset / 60; + // Non-integer number of hours off UTC? + if ($offset % 60) { + $minutes = abs($offset % 60); + return pht('UTC%+d:%02d', $hours, $minutes); } else { - return pht('UTC+%d', -$offset); + return pht('UTC%+d', $hours); } }