Lines Matching refs:timezone
20 // The filepath to the timezone file that symlinks to the actual timezone file.
21 const char kTimezoneSymlink[] = "/var/lib/timezone/localtime";
22 const char kTimezoneSymlink2[] = "/var/lib/timezone/localtime2";
24 // The directory that contains all the timezone files. So for timezone
25 // "US/Pacific", the actual timezone file is: "/usr/share/zoneinfo/US/Pacific"
59 virtual const icu::TimeZone& GetTimezone();
60 virtual void SetTimezone(const icu::TimeZone& timezone);
76 scoped_ptr<icu::TimeZone> timezone_;
84 // Look at kTimezoneSymlink, see which timezone we are symlinked to.
89 LOG(ERROR) << "GetTimezoneID: Cannot read timezone symlink "
94 std::string timezone(buf, len);
96 if (timezone.find(kTimezoneFilesDir) != 0) {
97 LOG(ERROR) << "GetTimezoneID: Timezone symlink is wrong "
98 << timezone;
102 return timezone.substr(strlen(kTimezoneFilesDir));
106 // Change the kTimezoneSymlink symlink to the path for this timezone.
116 LOG(ERROR) << "SetTimezoneID: Cannot find timezone file "
140 const icu::TimeZone& SystemAccessImpl::GetTimezone() {
144 void SystemAccessImpl::SetTimezone(const icu::TimeZone& timezone) {
145 timezone_.reset(timezone.clone());
147 timezone.getID(unicode);
150 VLOG(1) << "Setting timezone to " << id;
152 icu::TimeZone::setDefault(timezone);
153 FOR_EACH_OBSERVER(Observer, observers_, TimezoneChanged(timezone));
177 // Get Timezone
181 LOG(ERROR) << "Got an empty string for timezone, default to " << id;
183 icu::TimeZone* timezone =
184 icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(id));
185 timezone_.reset(timezone);
186 icu::TimeZone::setDefault(*timezone);
187 VLOG(1) << "Timezone is " << id;