2016/2/17:什么是Unix时间戳

来源:互联网 发布:电梯事故数据 编辑:程序博客网 时间:2024/05/21 19:46

  “把iPhone的时间手动调节到1970年1月1日,再重启之后手机就变砖了。”一旦因为时间设置真的变“砖”,可以通过耗光手机电量或者打开iPhone外壳把电池拆下再重装的办法来使手机恢复正常。

**********************************************

Unix time (also known as POSIX time or Epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds.

   Unix time is a single signed integer number which increments every second, without requiring the calculations to determine year, month, day of month, hour and minute required for intelligibility to humans. Modern Unix time is based on UTC, which counts time using SI seconds, and breaks up the span of time into days almost always 86400 seconds long, but due to leap seconds occasionally 86401 seconds.This extra second keeps the days synchronized with the rotation of the Earth, per Universal Time.
   The Unix epoch is the time 00:00:00 UTC on 1 January 1970. There is a problem with this definition, in that UTC did not exist in its current form until 1972; this issue is discussed below. For brevity, the remainder of this section uses ISO 8601 date format, in which the Unix epoch is 1970-01-01T00:00:00Z.
   The Unix time number is zero at the Unix epoch, and increases by exactly 86400 per day since the epoch. Thus 2004-09-16T00:00:00Z, 12677 days after the epoch, is represented by the Unix time number 12677 × 86400 = 1095292800.-10- This can be extended backwards from the epoch too, using negative numbers; thus 195704T00:00:00Z, 4472 days before the epoch, is represented by the Unix time number -4472 × 86400 = -386380800.
   Within each day, the Unix time number is calculated as in the preceding paragraph at midnight UTC (00:00:00Z), and increases by exactly 1 per second since midnight. Thus 2004-09-16T17:55:43.54Z, 64543.54 s since midnight on the day in the example above, is represented by the Unix time number 1095292800 + 64543.54 = 1095357343.54. On dates before the epoch the number still increases, thus becoming less negative, as time moves forward.
    Because Unix time is based on the Unix epoch, it is sometimes referred to as "epoch time". However this is an error, as the word epoch has a specific dictionary definition as "the start of something", and there have been many other epochs used in computing.


0 0
原创粉丝点击