System Properties (The Java™ Tutorials > Essential Classes > The Platform Environment) https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html « Previous • Trail • Next » The Java Tutorials have been written for JDK 8. Examples an…
工作中,遇到一个Java读取默认时区的问题,后来看了openjdk的源码,大致整理一下过程 public class Test { public void test(){ TimeZone.getDefault(); } } TimeZone.getDefault()会跳到下面代码: private static synchronized TimeZone setDefaultZone() { TimeZone tz; // get the time zone ID from the syste…