Tries to register the subclasses of TimeZone.
Try various things, doesn't matter if the map entry gets overwritten.
346595
private void tryRegisterTimeZone() {
        try {
            registered.put(SimpleTimeZone.class, JDKStringConverter.TIME_ZONE);

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterTimeZone1: " + ex);
            }
        }
        try {
            TimeZone zone = TimeZone.getDefault();
            registered.put(zone.getClass(), JDKStringConverter.TIME_ZONE);

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterTimeZone2: " + ex);
            }
        }
        try {
            TimeZone zone = TimeZone.getTimeZone("Europe/London");
            registered.put(zone.getClass(), JDKStringConverter.TIME_ZONE);

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterTimeZone3: " + ex);
            }
        }
    }
1028292
def save(self, *args, **kwargs):
        """"""
        if self.timestamp is None:
            self.timestamp = timezone.now()

        super().save(*args, **kwargs)
1181156
function () {
    var tzGuess = moment.tz.guess() || 'UTC';
    setCustomerTimezone(tzGuess);

    // Add the guessed customer timezone to list if its unknwon
    var knownTimezone = $.grep(timezones, function (tz) {
      return tz.key === customerTimezone
    }).length > 0
    if (!knownTimezone) {
      var name = '(' + moment().tz(customerTimezone).format('Z') + ') ' + customerTimezone
      timezones.unshift({
        key: customerTimezone,
        name: name
      });
    }
  }
506621
public final void setTimeZone(final TimeZone timeZone) {
        for (final Period period : this) {
            period.setTimeZone(timeZone);
        }
        this.timezone = timeZone;
        this.utc = false;
    }
840453
public TimeZone getTimeZone()
    {
        // If the TimeZone object is shared by other Calendar instances, then
        // create a clone.
        if (sharedZone) {
            zone = (TimeZone) zone.clone();
            sharedZone = false;
        }
        return zone;
    }
958005
private void tryRegisterThreeTenOld() {
        try {
            tryRegister("javax.time.Instant", "parse");
            tryRegister("javax.time.Duration", "parse");
            tryRegister("javax.time.calendar.LocalDate", "parse");
            tryRegister("javax.time.calendar.LocalTime", "parse");
            tryRegister("javax.time.calendar.LocalDateTime", "parse");
            tryRegister("javax.time.calendar.OffsetDate", "parse");
            tryRegister("javax.time.calendar.OffsetTime", "parse");
            tryRegister("javax.time.calendar.OffsetDateTime", "parse");
            tryRegister("javax.time.calendar.ZonedDateTime", "parse");
            tryRegister("javax.time.calendar.Year", "parse");
            tryRegister("javax.time.calendar.YearMonth", "parse");
            tryRegister("javax.time.calendar.MonthDay", "parse");
            tryRegister("javax.time.calendar.Period", "parse");
            tryRegister("javax.time.calendar.ZoneOffset", "of");
            tryRegister("javax.time.calendar.ZoneId", "of");
            tryRegister("javax.time.calendar.TimeZone", "of");

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterThreeTenOld: " + ex);
            }
        }
    }
1257508
def register_subclass(cls, typeid):
        
        def decorator(subclass):
            cls._subcls_lookup[typeid] = subclass
            subclass.typeid = typeid
            return subclass
        return decorator
1071298
def _get_timezone(self, tz):
        
        # special Local timezone
        if tz == "Local":
            try:
                return tzlocal.get_localzone()
            except pytz.UnknownTimeZoneError:
                return "?"

        # we can use a country code to get tz
        # FIXME this is broken for multi-timezone countries eg US
        # for now we just grab the first one
        if len(tz) == 2:
            try:
                zones = pytz.country_timezones(tz)
            except KeyError:
                return "?"
            tz = zones[0]

        # get the timezone
        try:
            zone = pytz.timezone(tz)
        except pytz.UnknownTimeZoneError:
            return "?"
        return zone
1287968
public void selfRegister() {
        LocalUnitsManager.unitMap(unitMap -> {
            unitMap.forEach((groupName, unitsIgnored) -> {
                try {
                    ServiceInstance<GroupProxy> serviceInstance = ZkServiceInstanceAdaptor.thisCuratorServiceInstance(groupName);
                    serviceDiscovery.registerService(serviceInstance);
                } catch (Exception e) {
                    LOG.error(e);
                    //the registration should not be interrupted due to one error.
                }
            });
        });
    }
1237970
public final void setTimeZone(final TimeZone timezone) {
        getStart().setUtc(false);
        getStart().setTimeZone(timezone);
        getEnd().setUtc(false);
        getEnd().setTimeZone(timezone);
    }
990219
private void buildTimeZoneExemplarCities(MethodSpec.Builder method, TimeZoneData data) {
    CodeBlock.Builder code = CodeBlock.builder();
    code.beginControlFlow("this.exemplarCities = new $T<$T, $T>() {", HashMap.class, String.class, String.class);
    for (TimeZoneInfo info : data.timeZoneInfo) {
      code.addStatement("put($S, $S)", info.zone, info.exemplarCity);
    }
    code.endControlFlow("}");
    method.addCode(code.build());
  }
1048626
public synchronized static void setDefault(TimeZone timeZone) {
        defaultTimeZone = timeZone != null ? (TimeZone) timeZone.clone() : null;
    }
362656
def register(cls, name, type_):
        

        if not issubclass(type_, Entry):
            raise exceptions.InvalidEntryType("%s is not a subclass of Entry" % str(type_))
        cls._registry[name.lower()] = type_
723390
private void init() {
        if (_tznames == null) {
            _tznames = TimeZoneNames.getInstance(_locale);
        }
        _genericLocationNamesMap = new ConcurrentHashMap<String, String>();
        _genericPartialLocationNamesMap = new ConcurrentHashMap<String, String>();

        _gnamesTrie = new TextTrieMap<NameInfo>(true);
        _gnamesTrieFullyLoaded = false;

        // Preload zone strings for the default time zone
        TimeZone tz = TimeZone.getDefault();
        String tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz);
        if (tzCanonicalID != null) {
            loadStrings(tzCanonicalID);
        }
    }
327239
public static GsonBuilder registerLocalDateTime(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(LOCAL_DATE_TIME_TYPE, new LocalDateTimeConverter());

    return builder;
  }
1227088
private void buildTimeZoneAliases(TypeSpec.Builder type, Map<String, String> map) {
    MethodSpec.Builder method = MethodSpec.methodBuilder("getTimeZoneAlias")
        .addModifiers(PUBLIC, STATIC)
        .addParameter(String.class, "zoneId")
        .returns(String.class);

    method.beginControlFlow("switch (zoneId)");
    for (Map.Entry<String, String> entry : map.entrySet()) {
      method.addStatement("case $S: return $S", entry.getKey(), entry.getValue());
    }
    method.addStatement("default: return null");
    method.endControlFlow();
    type.addMethod(method.build());
  }
386713
public <T> void RegisterClazz( Clazz<T> clazz )
	{
		_ensureMap();

		if( clazzz.containsKey( clazz.getReflectedClass() ) )
			return;

		clazzz.put( clazz.getReflectedClass(), clazz );
	}