void SetTimezone(const nsCString& aTimezoneSpec) { if (aTimezoneSpec.Equals(GetTimezone())) { return; } property_set("persist.sys.timezone", aTimezoneSpec.get()); // this function is automatically called by the other time conversion // functions that depend on the timezone. To be safe, we call it manually. tzset(); hal::NotifySystemTimeChange(hal::SYS_TIME_CHANGE_TZ); }
nsCString GetTimezone() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetTimezone(), nsCString("")); }