Chinaunix首页 | 论坛 | 博客
  • 博客访问: 456803
  • 博文数量: 153
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1575
  • 用 户 组: 普通用户
  • 注册时间: 2016-12-20 17:02
文章分类

全部博文(153)

文章存档

2017年(111)

2016年(42)

我的朋友

分类: Mysql/postgreSQL

2017-01-03 14:43:15

标签

PostgreSQL , Linux , POSIX , UT1 , UTC , leap second , 闰秒 , epoch , solar time , 太阳时 , unix time , Universal Time , Coordinated Universal Time , International Atomic Time


背景

什么是闰秒,为什么需要闰秒,闰秒会不会对数据库产生影响?

要搞清楚这个问题,可以查一下维基百科,对闰秒的解释,牵扯出了一堆的概念,比如

POSIX , UT1 , UTC , leap second , 闰秒 , epoch , solar time , 太阳时 , unix time , Universal Time , Coordinated Universal Time , International Atomic Time

下面我小结一下。

1. solar time , 太阳时

Solar time is a calculation of the passage of time based on the Sun's position in the sky.

The fundamental unit of solar time is the day.

Two types of solar time are apparent solar time (sundial time) and mean solar time (clock time).

solar time是基于星体运转的时间,比如地球自转一周为一天。它的特点是很形象,但是不好在计算机中实施(或者说天体的运转受制于各种因素的影响并不稳定,目前的原子钟与之不能很好的对齐,这也是需要闰秒的开端)。

The difference between this calculated mean solar time and Coordinated Universal Time (UTC) determines whether a leap second is needed.

(The UTC time scale now runs on SI seconds, and the SI second, when adopted, was already a little shorter than the current value of the second of mean solar time.

pic

2. mean solar time , 平太阳时

pic

平太阳时

MT(mean solar time),简称“平时”,也就是我们日常生活中所使用的时间。

太阳连续两次经过上中天的时间间隔,称为真太阳日。我们知道,地球沿着椭圆形轨道运动的,太阳位于该椭圆的一个焦点上,因此,在一年中,日地距离不断改变。根据开普勒第二定律,行星在轨道上运动的方式是它和太阳所联结的直线在相同时间内所划过的面积相等,可见,地球在轨道上做的是不等速运动,这样一来,一年之内真太阳日的长度便不断改变,不易选做计时单位,于是引进平太阳的概念。天文学上假定由一个太阳(平太阳)在天赤道上(而不是在黄赤道上)作等速运行,其速度等于运行在黄赤道上真太阳的平均速度,这个假想的太阳连续两次上中天的时间间隔,叫做一个平太阳日,这也相当于把一年中真太阳日的平均称为平太阳日[1] ,并且把1/24平太阳日取为1平太阳时。通常所谓的“日”和“时”,就是平太阳日和平太阳时的简称。

阅读(1264) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~