1970 年之前的日期有什么特别之处?
我看到很多关于获取 1970 年之前的日期的讨论。例如,我看到人们问这样的问题:“如何在 1970 年之前找到约会对象?”
我想知道1970年有什么特别之处?为什么人们很难获得该特定年份之前的日期?这是宇宙的开始还是什么?
I see a lot of discussion about getting dates that are pre-1970. For example, I see people ask a question like, "how do I get a date before 1970?"
What I'd like to know is what is so special about 1970? Why do people have trouble getting dates before that particular year? Was it the beginning of the universe or something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它是 UNIX 纪元 的开始,时间戳为 0。所有 UNIX 时间戳都是自 UTC 1970 年 1 月 1 日以来的秒数。撰写本文的时刻是时间戳 1298440626。UNIX
时间戳出现在许多语言和软件的日期时间库中,因为出于各种原因将时间存储为秒数很方便。
由于 1970 年是时间 0,因此之前的日期通常不能存储为时间戳。
It is the beginning of the UNIX epoch, timestamp 0. All UNIX timestamps are the number of seconds since January 1st 1970 UTC. The moment of this writing is timestamp 1298440626.
UNIX timestamps pop up in the datetime libraries of a lot of languages and software, as storing times as a number of seconds is convenient for various reasons.
Since 1970 is time 0, dates before then can't typically be stored as timestamps.
这与UNIX时代有关。它们存储为自纪元以来的秒数,纪元定义为 1970 年 1 月 1 日 (UTC) 当天的开始。
这也是即将到来的 Y2K38 错误的原因,该错误的值将在 2038 年 2 月初的某个时候(根据记忆)翻转为负值。当然,除非他们将其提高到超出有符号的 32 位值。
It has to do with UNIX times. They're strored as number of seconds since the epoch, and the epoch is defined as the start of the day January 1, 1970 (UTC).
That's also the cause for the upcoming Y2K38 bug where the value will roll over to negative sometime early Feb (from memory) in 2038. Unless they up it to beyond a signed 32-bit value, of course.
这是 UNIX 时代的开始。
It was the beginning of the UNIX era.