Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1670)

Unified Diff: chrome/browser/chromeos/system/timezone_util.cc

Issue 1237023002: ChromeOS should have UTC timezone option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chromeos/settings/timezone_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/timezone_util.cc
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc
index 56124c0e084ed8514fcac86d25358c3be321f155..7ab822d6de0131262266125d268480b12e7e1d7d 100644
--- a/chrome/browser/chromeos/system/timezone_util.cc
+++ b/chrome/browser/chromeos/system/timezone_util.cc
@@ -118,8 +118,16 @@ base::string16 GetTimezoneName(const icu::TimeZone& timezone) {
// In the meantime, we use "LONG" name with "Exemplar City" to distinguish
// multiple timezones with the same "LONG" name but with different
// rules (e.g. US Mountain Time in Denver vs Phoenix).
+ icu::UnicodeString id;
icu::UnicodeString name;
- timezone.getDisplayName(dst_offset != 0, icu::TimeZone::LONG, name);
+ timezone.getID(id);
+ if (id == icu::UnicodeString(chromeos::system::kUTCTimezoneName)) {
+ name = icu::UnicodeString(
+ l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_NAME_UTC)
+ .c_str());
+ } else {
+ timezone.getDisplayName(dst_offset != 0, icu::TimeZone::LONG, name);
+ }
base::string16 result(l10n_util::GetStringFUTF16(
IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE,
base::ASCIIToUTF16(offset_str),
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chromeos/settings/timezone_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698