Get time zone of the browser client to be used as default.
10689
private static String getClientTimeZone() {
        return ZonedDateTime.now(SPDateTimeUtil.getTimeZoneId(SPDateTimeUtil.getBrowserTimeZone())).getOffset().getId()
                .replaceAll("Z", "+00:00");
    }
662179
def c(self):
        """"""
        if self._client is None:
            self._parse_settings()
            self._client = Rumetr(**self.settings)
        return self._client
46533
public com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone() {
    return timeZone_ == null
        ? com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance()
        : timeZone_;
  }
407152
def _detect_timezone_windows():
  """"""
  # pylint: disable=global-statement
  global win32timezone_to_en

  # Try and fetch the key_name for the timezone using
  # Get(Dynamic)TimeZoneInformation
  tzi = DTZI_c()
  kernel32 = ctypes.windll.kernel32
  getter = kernel32.GetTimeZoneInformation
  getter = getattr(kernel32, "GetDynamicTimeZoneInformation", getter)

  # code is for daylight savings: 0 means disabled/not defined, 1 means enabled
  # but inactive, 2 means enabled and active
  _ = getter(ctypes.byref(tzi))

  win32tz_key_name = tzi.key_name
  if not win32tz_key_name:
    if win32timezone is None:
      return None
    # We're on Windows before Vista/Server 2008 - need to look up the
    # standard_name in the registry.
    # This will not work in some multilingual setups if running in a language
    # other than the operating system default
    win32tz_name = tzi.standard_name
    if not win32timezone_to_en:
      win32timezone_to_en = dict(
          win32timezone.TimeZoneInfo._get_indexed_time_zone_keys("Std"))
    win32tz_key_name = win32timezone_to_en.get(win32tz_name, win32tz_name)

  territory = locale.getdefaultlocale()[0].split("_", 1)[1]
  olson_name = win32tz_map.win32timezones.get((win32tz_key_name, territory), win32tz_map.win32timezones.get(win32tz_key_name, None))
  if not olson_name:
    return None
  if not isinstance(olson_name, str):
    olson_name = olson_name.encode("ascii")

  return pytz.timezone(olson_name)
1066669
def _get_tz(tz):
    
    zone = timezones.get_timezone(tz)
    if zone is None:
        zone = tz.utcoffset().total_seconds()
    return zone
158617
def datetime(self, field=None, val=None):
        
        if val is None:
            def source():
                tzinfo = get_default_timezone() if settings.USE_TZ else None
                return datetime.fromtimestamp(randrange(1, 2100000000),
                                              tzinfo)
        else:
            def source():
                tzinfo = get_default_timezone() if settings.USE_TZ else None
                return datetime.fromtimestamp(int(val.strftime("%s")) +
                                              randrange(-365*24*3600*2, 365*24*3600*2),
                                              tzinfo)
        return self.get_allowed_value(source, field)
462339
def timezone(self):
        
        date = self.message.get('date')
        timezone = 0

        try:
            _, timezone = convert_mail_date(date)
        finally:
            return timezone
1277162
def T(self):
    "'"
    name = self.timezone and self.timezone.tzname(self.data) or None
    if name is None:
      name = self.format('O')
    return unicode(name)
1354184
public function getTimeZone() {
        $tzs = $this->user->getPropertyValues(GenerisRdf::PROPERTY_USER_TIMEZONE);
        $tz = empty($tzs) ? '' : (string)current($tzs);
        return empty($tz) ? TIME_ZONE : $tz;
    }
308841
def initialize_time_zone
      if configuration.time_zone
        zone_default = Time.__send__(:get_zone, configuration.time_zone)

        unless zone_default
          raise \
            'Value assigned to config.time_zone not recognized.' +
            'Run "rake -D time" for a list of tasks for finding appropriate time zone names.'
        end

        Time.zone_default = zone_default

        if defined?(ActiveRecord)
          ActiveRecord::Base.time_zone_aware_attributes = true
          ActiveRecord::Base.default_timezone = :utc
        end
      end
    end
247855
def get_time(time_to_convert=None):
    """"""
    if time_to_convert is None:
        time_to_convert = time.time()
    return time.strftime(TIMESTAMP_FORMAT, time.localtime(time_to_convert))
7259
function clientNow() {
  var d = new Date();
  var offset = -1 * d.getTimezoneOffset();

  d.setUTCMinutes(d.getUTCMinutes() + offset);
  return d.toISOString().replace('Z', minutesToOffsetString(offset));
}
563980
def tz(self):
        """"""

        if self.timezone is None:
            return None

        try:
            tz = pytz.timezone(self.timezone)
            return tz
        except pytz.UnknownTimeZoneError:
            raise AstralError("Unknown timezone '%s'" % self.timezone)
937719
def ulocalized_gmt0_time(self, time, context, request):
        
        value = get_date(context, time)
        if not value:
            return ""
        # DateTime is stored with TimeZone, but DateTimeWidget omits TZ
        value = value.toZone("GMT+0")
        return self.ulocalized_time(value, context, request)
896597
async def get_timezone(self) -> Optional[tzinfo]:
        

        u = await self._get_user()
        diff = float(u.get('timezone', 0)) * 3600.0

        return tz.tzoffset('ITC', diff)
799089
private function getTimezone()
    {
        if (!$this->timezone) {
            $this->timezone = $this->coreParametersHelper->getParameter(
                'default_timezone'
            );
        }

        return $this->timezone;
    }
184653
def cst_now():
    
    try:
        ret = datetime.utcnow() + timedelta(hours=DEFAULT_TIMEZONE)
        if DEFAULT_TIMEZONE_AWARE:
            ret = ret.replace(
                tzinfo=psycopg2.tz.FixedOffsetTimezone(
                    name=None, offset=DEFAULT_TIMEZONE * 60))
        return ret
    except Exception as ex:
        return datetime.utcnow() + timedelta(hours=DEFAULT_TIMEZONE)