What is Timestamp?
Unix timestamp is a time representation method, defined as the total number of seconds from 00:00:00 on January 1, 1970, Greenwich Time to the present. Characteristics of timestamp Yes, the calculated timestamp will be the same value no matter which time zone it is in. This is very useful for applications, whether you want to track time, calculate time differences, or sort dates, you can use timestamps. When converting timestamps to time, the local time can also be calculated based on the time zone, which is a technology that has been widely used in the programming world.
- When it comes to time consistency, it is difficult not to talk about timestamps. There is no concept of time zones. The unit is "seconds" or "milliseconds".
- The timestamp unit is "milliseconds" or "seconds" and is calculated from Greenwich 1970-01-01 00:00:00.
- Time stamps have no time zone concept. Whether it is Moscow or Taipei, at the same time, you will get the same timestamp, but the same timestamp can be converted into local time through time zone differences.
Time zone (GMT, UTC, CST?)
- Common time zone representations include GMT, UTC, and CST. So what are the differences between the three?
- GMT: Greenwich Time, this is what is taught in primary schools, and Greenwich GMT+0000, Taipei GMT+0800.
- UTC: Coordinated Universal Time, which is not much different from GMT, but is the most commonly used format in the world. It is the same as UTC+0000 in Greenwich and UTC+0800 in Taipei.
- CST: National Standard Time. This format is basically not used because we don't know which country the "country" refers to. For example, the United States, Beijing, and Australia can be used.
ISO time representation format
- ISO format: YYYY-MM-DDTHH:mm:ss.msZ or YYYY-MM-DDTHH:mm:ss.ms time zone
- T: It is the symbol that divides "date" and "time".
- Z: means UTC+0. If you see Z in the ISO notation, it means that this is UTC+0 time.
- Time zone: It is the adopted time zone. For example, Taiwan is YYYY-MM-DDTHH:mm:ss.ms+08:00.
If you want to know the time in other regions, you can refer to it
World Clock