package org.kodejava.util;
import java.util.TimeZone;
public class HostDefaultTimeZone {
public static void main(String[] args) {
// Gets the default TimeZone ID for this host
String id = TimeZone.getDefault().getID();
System.out.println("Default Time Zone ID: " + id);
}
}
The default timezone id for this host is:
Default Time Zone ID: Asia/Shanghai
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