We would like to know how to get all zone id strings.
import java.time.ZoneId; // ww w. ja va 2 s . co m public class Main { public static void main(String[] args) { ZoneId.getAvailableZoneIds().stream().filter(s -> s.startsWith("Asia")) .forEach(System.out::println); ZoneId.getAvailableZoneIds().stream().forEach(System.out::println); } }
The code above generates the following result.