Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15309028
D19873.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19873.id.diff
View Options
diff --git a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
--- a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
+++ b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
@@ -63,7 +63,7 @@
$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 @@
}
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);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 6:49 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7324945
Default Alt Text
D19873.id.diff (1 KB)
Attached To
Mode
D19873: Show more of UTC offset when user's TZ is not an integer number of hours offset
Attached
Detach File
Event Timeline
Log In to Comment