package org.kodejava.util;
import java.util.TimeZone;
public class TimeZoneByOffset {
public static void main(String[] args) {
// Gets the available IDs according to the given time zone
// offset in milliseconds.
int offset = 8 * 60 * 60 * 1000;
String[] timezones = TimeZone.getAvailableIDs(offset);
System.out.println("List of available IDs for GMT:+08:00");
System.out.println("====================================");
for (String id : timezones) {
System.out.println(id);
}
}
}
Here are the timezone ids in the GMT+8 offset:
List of available IDs for GMT:+08:00
====================================
Asia/Brunei
Asia/Choibalsan
Asia/Chongqing
Asia/Chungking
Asia/Harbin
Asia/Hong_Kong
Asia/Irkutsk
Asia/Kuala_Lumpur
Asia/Kuching
Asia/Macao
Asia/Macau
Asia/Makassar
Asia/Manila
Asia/Shanghai
Asia/Singapore
Asia/Taipei
Asia/Ujung_Pandang
Asia/Ulaanbaatar
Asia/Ulan_Bator
Australia/Perth
Australia/West
CTT
Etc/GMT-8
Hongkong
PRC
Singapore
Latest posts by Wayan (see all)
- How do I get number of each day for a certain month in Java? - September 8, 2024
- How do I get operating system process information using ProcessHandle? - July 22, 2024
- How do I sum a BigDecimal property of a list of objects using Java Stream API? - July 22, 2024