The so-called "time Era" is January 1, 1970 0:0 0 seconds, refers to the beginning of time. For example, Java class Code:
New Date (0); SYSTEM.OUT.PRINTLN (date);
Print out the results:
Thu Jan 08:00:00 CST 1970
Also January 1, 1970, in fact, minutes and seconds is 0 points 0 minute 0 seconds, here the time to print out is 8 points instead of 0 points, because of the existence of system time and local time problem, in fact, the system time is still 0 points, but our computer time zone is set to East 8, so the result is 8 points.
Time Zone Division
The Earth rotates from the west to the east, the east to the west, and the east to the west. The difference between East and West time is not only in the time, but also in minutes and seconds to calculate, which brings inconvenience to people.
To overcome the chaos of time, a 1884 international Longitude Conference in Washington, also known as the International Meridian Conference , provides for a global divide into 24 time zones (12 time zones in the east and west). The United Kingdom (Greenwich Observatory site) is the central Time zone (zero Zone), East 1-12 District, West 1-12 District. Each time zone spans a longitude of 15 degrees, and the time is exactly 1 hours. The last of the East and west of the 12th area across the longitude 7.5 degrees, east, longitude 180 degrees in the boundary. The time on the central meridian of each time zone is the uniformly adopted time in this time zone, called the Zone, and the time difference between the adjacent two time zones is 1 hours. For example, the time in East 8 of China is always 1 hours earlier than that of Thailand's East 7, and 1 hours later than in Japan's East 9 district. Therefore, people who travel abroad must adjust their watches at any time to coincide with local time. All the way to the west, every time zone, you have to dial the table for 1 hours (such as 2 to 1 o'clock); If you go east, each time zone, you must dial the table for 1 hours (such as 1 to 2 o'clock). It also stipulates that the British (Greenwich Observatory site) is the Prime Meridian, which is 0 o'clock (24 o'clock) longitude.
Time zone Access
Gets the time zone of the current system through the Getdefault method in the Java.util.TimeZone class. This class is ultimately the getTimeZone method that invokes the Sun.util.calendar.ZoneInfo class. This method returns the time zone ID of a string type. The default time zone ID is obtained from the User.timezone property of the System class. If User.timezone is not defined, it tries to get the ID from the User.country and Java.home properties. If it does not successfully find a time zone ID, it uses GMT as the default time zone for the system.
Add: The properties of the system class are initialized in the InitProperties method of the Java.lang.System class. This is a local method. In Windows systems, the system property is initialized from the Windows registry and is initialized by an environment variable in Linux/unix.
Time era and time zone introduction