Gets zoned data time.

@param timestamp the timestamp
@param zoneId    the zone id
@return the zoned data time
436985
public static ZonedDateTime getZonedDataTime(long timestamp,
            String zoneId) {
        return Instant.ofEpochMilli(timestamp).atZone(getZoneId(zoneId));
    }
630751
public static ZonedDateTime zonedDateTimeOf(final long time, final ZoneId zoneId) {
        return ZonedDateTime.ofInstant(Instant.ofEpochMilli(time), zoneId);
    }
209430
public static String getCurrentTimestamp(String timeFormat, String zoneId) {
        return getTime(System.currentTimeMillis(), timeFormat, zoneId);
    }
1275034
public static ZoneId getTimeZoneId(final TimeZone tz) {
        return ZoneId.of(tz.getID(), ZoneId.SHORT_IDS);
    }
1020153
@Nonnull
  public static ESuccess setDefaultDateTimeZoneID (@Nonnull @Nonempty final String sDateTimeZoneID)
  {
    ValueEnforcer.notEmpty (sDateTimeZoneID, "DateTimeZoneID");

    try
    {
      // Try to resolve ID -> throws exception if unknown
      final ZoneId aDefaultZoneId = ZoneId.of (sDateTimeZoneID);

      // getTimeZone falls back to GMT if unknown
      final TimeZone aDefaultTimeZone = TimeZone.getTimeZone (aDefaultZoneId);

      s_aDefaultZoneId = aDefaultZoneId;
      TimeZone.setDefault (aDefaultTimeZone);
      return ESuccess.SUCCESS;
    }
    catch (final DateTimeException ex)
    {
      // time zone ID is unknown
      LOGGER.warn ("Unsupported ZoneId '" + sDateTimeZoneID + "'", ex);
      return ESuccess.FAILURE;
    }
  }
354992
public static String changeTimestampToNewFormatWithDefaultZoneId(
            String isoTimestamp, String newDateFormat) {
        return changeTimestampToNewFormat(isoTimestamp,
                getDateTimeFormatter(newDateFormat));
    }
318175
public TimezoneAssignment getTimezoneById(String tzid) {
		for (TimezoneAssignment assignment : assignments) {
			VTimezone component = assignment.getComponent();
			if (component == null) {
				continue;
			}

			String componentId = ValuedProperty.getValue(component.getTimezoneId());
			if (tzid.equals(componentId)) {
				return assignment;
			}
		}
		return null;
	}
360791
public static String getFormatDate(String format, String zoneId) {
        return getFormatDate(format, new Date(), zoneId);
    }
1300165
public ZonedDateTime getAsNullableDateTime(String key) {
		Object value = getAsObject(key);
		return DateTimeConverter.toNullableDateTime(value);
	}
574430
public Name getTimeZoneName(String zoneId, ZonedDateTime date, boolean long_) {
    TimeZoneNames names = timezoneNames.get(zoneId);
    if (names != null) {
      return long_ ? names.longName() : names.shortName();
    }
    
    zoneId = _CalendarUtils.getMetazone(zoneId, date);
    if (zoneId == null) {
      return null;
    }
    names = metazoneNames.get(zoneId);
    if (names != null) {
      return long_ ? names.longName() : names.shortName();
    }
    return null;
  }
5492
public static DateTime toDateTime(String dateTime, String timeZoneId) {
    return dateTimesHelper.toDateTime(dateTime, timeZoneId);
  }
328600
public void setTimeZoneID(String timeZoneId) {
        if (verifyTimeZoneID(timeZoneId)) {
            this.timeZone = TimeZone.getTimeZone(timeZoneId);
        } else {
            throw new IllegalArgumentException(timeZoneId + " is not a valid time zone");
        }

    }
357048
public T toDateTime(Instant instant, String timeZoneId) {
    return toDateTime(
        instant.toDateTime(DateTimeZone.forTimeZone(TimeZone.getTimeZone(timeZoneId))));
  }
414480
public static ZoneOffset getZoneOffset(String zoneOffsetId) {
        return JMMap.getOrPutGetNew(zoneOffsetCache, zoneOffsetId,
                () -> ZoneOffset.of(zoneOffsetId));
    }
815579
@Override
    public TZID getID() {

        if (this.id == null) {
            String zoneID = java.util.TimeZone.getDefault().getID();
            return new NamedID(zoneID);
        } else {
            return this.id;
        }

    }
403998
public static String getFormatDate(String format, Date date, String zoneId) {
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
        return dateTimeFormatter
            .format(date.toInstant().atZone(ZoneId.of(zoneId)).toLocalDateTime());
    }
239805
public static String getTime(long epochTimestamp,
            DateTimeFormatter dateTimeFormatter, ZoneId zoneId) {
        return ZonedDateTime
                .ofInstant(Instant.ofEpochMilli(epochTimestamp), zoneId)
                .format(dateTimeFormatter);
    }