Where is the official list of zone names for java.time?
问题 Is there an official list of zone names that are used for the following: zoneId = ZoneId.of("America/New_York") Or is it possible for java.time.ZoneId to generate the list itself that I can use? I'm using this to convert an Instant to a string representation of time like: ZoneDateTime.ofInstant(instant, zoneId).format(DateTimeFormatter.ofPattern("...")) 回答1: Just use the getAvailableZoneIds method. Gets the set of available zone IDs. This set includes the string form of all available region