Example #1
0
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);
}
Example #2
0
nsCString
GetTimezone()
{
  AssertMainThread();
  RETURN_PROXY_IF_SANDBOXED(GetTimezone(), nsCString(""));
}