PostgreSQL最大时间值

huangapple go评论60阅读模式
英文:

Postgresql max time value

问题

在PostgreSQL文档中关于日期/时间类型的部分中提到,时间类型可以具有最大值为24:00:00。有人可以解释一下将这个值设置为24:00:00而不是23:59:59的目的吗?可能有原因,但我不太明白。

https://www.postgresql.org/docs/current/datatype-datetime.html

英文:

In the postgresql documentation related to date/time types. It is stated that the type time can have a max value of 24:00:00. Can someone could explain to me the purpose of settings this value to this instead of 23:59:59 ? There's maybe a reason for this but i just don't get it.

https://www.postgresql.org/docs/current/datatype-datetime.html

答案1

得分: 0

当发生闰秒时,传统的表示方式是 23:59:60,但看起来 PostgreSQL 选择使用小时 24 来处理它。

英文:

When there is a leap second the traditional way of representing that is 23:59:60 but it looks like PostgreSQL chose to handle it with the hour 24.

huangapple
  • 本文由 发表于 2023年5月25日 06:09:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76327708.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定