Home
last modified time | relevance | path

Searched refs:timezoneId (Results 1 - 17 of 17) sorted by relevance

/base/time/time_service/services/time/src/
H A Dtime_zone_info.cpp55 bool TimeZoneInfo::SetTimezone(const std::string &timezoneId) in SetTimezone() argument
58 if (curTimezoneId_ == timezoneId) { in SetTimezone()
63 timezoneId.c_str(), curTimezoneId_.c_str(), IPCSkeleton::GetCallingUid()); in SetTimezone()
65 if (availableTimeZoneIDs.find(timezoneId) == availableTimeZoneIDs.end()) { in SetTimezone()
69 setenv("TZ", timezoneId.c_str(), 1); in SetTimezone()
75 auto errNo = SetParameter(TIMEZONE_KEY, timezoneId.c_str()); in SetTimezone()
77 TIME_HILOGE(TIME_MODULE_SERVICE, "SetTimezone timezoneId: %{public}d: %{public}s", errNo, timezoneId.c_str()); in SetTimezone()
80 curTimezoneId_ = timezoneId; in SetTimezone()
112 bool TimeZoneInfo::GetTimezone(std::string &timezoneId) in GetTimezone() argument
[all...]
/base/global/i18n/frameworks/zone/test/unittest/
H A Dzone_util_test.cpp218 EXPECT_EQ(result.timezoneId, "Asia/Shanghai"); in HWTEST_F()
223 EXPECT_EQ(result2.timezoneId, "Asia/Urumqi"); in HWTEST_F()
242 EXPECT_TRUE(possibleTimeZones.find(result.timezoneId) != possibleTimeZones.end()); in HWTEST_F()
251 EXPECT_TRUE(possibleTimeZones.find(result2.timezoneId) != possibleTimeZones.end()); in HWTEST_F()
257 EXPECT_TRUE(possibleTimeZones.find(result3.timezoneId) != possibleTimeZones.end()); in HWTEST_F()
262 EXPECT_EQ(result4.timezoneId, ""); in HWTEST_F()
267 EXPECT_EQ(result5.timezoneId, ""); in HWTEST_F()
281 EXPECT_EQ(result.timezoneId, "Antarctica/McMurdo"); in HWTEST_F()
286 EXPECT_EQ(result2.timezoneId, ""); in HWTEST_F()
291 EXPECT_EQ(result3.timezoneId, "Americ in HWTEST_F()
[all...]
/base/time/time_service/services/time/include/
H A Dtime_zone_info.h34 bool GetTimezone(std::string &timezoneId);
35 bool SetTimezone(const std::string &timezoneId);
/base/global/i18n/frameworks/intl/src/
H A Dsystem_locale_manager.cpp195 std::string timezoneId = I18nTimeZone::GetTimezoneIdByCityId(cityId); in GetTimezoneCityInfoArray() local
196 if (timezoneId.length() == 0) { in GetTimezoneCityInfoArray()
199 if (tzMap.find(timezoneId) != tzMap.end()) { in GetTimezoneCityInfoArray()
200 icu::TimeZone *icuTimeZone = tzMap.find(timezoneId)->second; in GetTimezoneCityInfoArray()
203 icu::UnicodeString unicodeString = icu::UnicodeString::fromUTF8(timezoneId); in GetTimezoneCityInfoArray()
209 tzMap.insert({timezoneId, icuTimeZone}); in GetTimezoneCityInfoArray()
212 timezoneId, cityId, PseudoLocalizationProcessor(cityDisplayName, ifEnforce), dstOffset + rawOffset, in GetTimezoneCityInfoArray()
/base/time/time_service/interfaces/inner_api/include/
H A Dtime_service_interface.h43 * @param timezoneId std::string &timezoneId string
46 virtual int32_t SetTimeZone(const std::string &timezoneId, APIVersion apiVersion = APIVersion::API_VERSION_7) = 0;
51 * @param timezoneId std::string &timezoneId string
54 virtual int32_t GetTimeZone(std::string &timezoneId) = 0;
H A Dtime_service_client.h88 TIME_API bool SetTimeZone(const std::string &timezoneId, int32_t &code);
98 TIME_API int32_t SetTimeZoneV9(const std::string &timezoneId);
117 TIME_API int32_t GetTimeZone(std::string &timezoneId);
/base/time/time_service/test/fuzztest/timemanager_fuzzer/timesettimezone_fuzzer/
H A Dtimesettimezone_fuzzer.cpp42 std::string timezoneId; in FuzzTimeGetTimezone() local
43 TimeServiceClient::GetInstance()->GetTimeZone(timezoneId); in FuzzTimeGetTimezone()
/base/time/time_service/interfaces/inner_api/src/
H A Dtime_service_client.cpp202 bool TimeServiceClient::SetTimeZone(const std::string &timezoneId) in SetTimeZone() argument
211 return proxy->SetTimeZone(timezoneId) == ERR_OK; in SetTimeZone()
214 bool TimeServiceClient::SetTimeZone(const std::string &timezoneId, int32_t &code) in SetTimeZone() argument
225 code = proxy->SetTimeZone(timezoneId); in SetTimeZone()
230 int32_t TimeServiceClient::SetTimeZoneV9(const std::string &timezoneId) in SetTimeZoneV9() argument
239 return proxy->SetTimeZone(timezoneId, ITimeService::API_VERSION_9); in SetTimeZoneV9()
449 int32_t TimeServiceClient::GetTimeZone(std::string &timezoneId) in GetTimeZone() argument
458 if (proxy->GetTimeZone(timezoneId) != ERR_OK) { in GetTimeZone()
/base/global/i18n/frameworks/zone/src/
H A Dzone_util.cpp273 if (result.timezoneId.length() == 0 && nitzData.isDST >= 0) { in LookupTimezoneByNITZ()
297 result.timezoneId = defaultTimezone; in LookupTimezoneByCountry()
436 std::string timezoneId; in GetICUCountryZones() local
437 canonicalUnistring.toUTF8String(timezoneId); in GetICUCountryZones()
438 if (validZoneIds.find(timezoneId) != validZoneIds.end()) { in GetICUCountryZones()
439 countryZoneIds.insert(timezoneId); in GetICUCountryZones()
/base/global/i18n/frameworks/intl/include/
H A Di18n_calendar.h55 void SetTimeZone(std::string timezoneId);
/base/global/i18n/interfaces/native/inner_api/zone/include/
H A Dzone_util.h48 std::string timezoneId; member
/base/time/time_service/framework/js/napi/common/src/
H A Dnapi_utils.cpp213 size_t argc, std::string &timezoneId, napi_ref &callback) in ParseParametersBySetTimezone()
226 timezoneId = std::string(timeZoneChars); in ParseParametersBySetTimezone()
212 ParseParametersBySetTimezone(napi_env env, const napi_value (&argv)[SET_TIMEZONE_MAX_PARA], size_t argc, std::string &timezoneId, napi_ref &callback) ParseParametersBySetTimezone() argument
/base/time/time_service/framework/js/napi/common/include/
H A Dnapi_utils.h139 size_t argc, std::string &timezoneId, napi_ref &callback);
/base/global/i18n/interfaces/js/kits/src/
H A Di18n_timezone_addon.cpp288 napi_value timezoneId = nullptr; in GetTimezonesByLocation() local
289 status = napi_create_string_utf8(env, tempList[i].c_str(), NAPI_AUTO_LENGTH, &timezoneId); in GetTimezonesByLocation()
293 napi_value argTimeZoneId[1] = { timezoneId }; in GetTimezonesByLocation()
/base/time/time_service/framework/js/napi/system_time/src/
H A Djs_systemtime.cpp126 std::string timezoneId; in JSSystemTimeSetTimeZone() local
128 if (NapiUtils::ParseParametersBySetTimezone(env, argv, argc, timezoneId, callback) == nullptr) { in JSSystemTimeSetTimeZone()
131 AsyncContext *asyncContext = new (std::nothrow) AsyncContext{ .env = env, .timeZone = timezoneId }; in JSSystemTimeSetTimeZone()
/base/global/i18n/frameworks/intl/test/unittest/
H A Di18n_test.cpp566 std::string timezoneId = timezone1.GetID(); in HWTEST_F() local
567 EXPECT_EQ(timezoneId, "Asia/Shanghai"); in HWTEST_F()
572 timezoneId = timezone2.GetID(); in HWTEST_F()
573 EXPECT_EQ(timezoneId, "Asia/Shanghai"); in HWTEST_F()
577 timezoneId = timezone3.GetID(); in HWTEST_F()
578 EXPECT_EQ(timezoneId, "Pacific/Auckland"); in HWTEST_F()
581 EXPECT_EQ(timezoneId, "Pacific/Auckland"); in HWTEST_F()
H A Dintl_test_extent.cpp392 std::string timezoneId = "Asia/Shanghai"; in HWTEST_F() local
393 I18nTimeZone *i18nTimeZone = new I18nTimeZone(timezoneId, true); in HWTEST_F()
413 std::unique_ptr<I18nTimeZone> timezone = I18nTimeZone::CreateInstance(timezoneId, true); in HWTEST_F()

Completed in 15 milliseconds