avatar
DATE TIME In RDBMS# Java - 爪哇娇娃
F*n
1
Does anyone notice that most RDBMSs have unbelievable limits on Date/Time
range they support? For example, mysql only supports date from 1000-01-01,
so you cannot enter earlier dates in a Date/Time column.
What the hell are those providers thinking? Is supporting Date/Time so big
an issue that they have to resort to those stupid limits?
What the solutions most people use?
avatar
j*a
2
Because MySQL is a free software, that is why they support like that.
Why don't you use other database?
Oracle's date range from 4712BC to 9999AD.
PostgreSQL's date range from 4713BC to 5874897AD.

【在 F****n 的大作中提到】
: Does anyone notice that most RDBMSs have unbelievable limits on Date/Time
: range they support? For example, mysql only supports date from 1000-01-01,
: so you cannot enter earlier dates in a Date/Time column.
: What the hell are those providers thinking? Is supporting Date/Time so big
: an issue that they have to resort to those stupid limits?
: What the solutions most people use?

avatar
s*n
3
it is actually very complicated. you can see it from java date classes
http://www.docjar.com/html/api/java/util/GregorianCalendar.java.html
mysql is probably over sensitive about efficiency.

【在 F****n 的大作中提到】
: Does anyone notice that most RDBMSs have unbelievable limits on Date/Time
: range they support? For example, mysql only supports date from 1000-01-01,
: so you cannot enter earlier dates in a Date/Time column.
: What the hell are those providers thinking? Is supporting Date/Time so big
: an issue that they have to resort to those stupid limits?
: What the solutions most people use?

avatar
F*n
4
IMO, those RDBMS people constantly cannot understand the difference between
a date and a dateformat. Those people always try to legitimate their
implementation by spending several pages talking about Date Format. In fact
for date / time storage you only need a integer / long, and the complexity
of DateFormat can always be encapsulated in the JDBC driver (or other DB
access API).

【在 s******n 的大作中提到】
: it is actually very complicated. you can see it from java date classes
: http://www.docjar.com/html/api/java/util/GregorianCalendar.java.html
: mysql is probably over sensitive about efficiency.

avatar
c*t
5
你说的估计一般使用可以足够。但是有些年 +/- 些 second,而如果真需要这种
resolution 的话,还真是个麻烦事。

between
fact


【在 F****n 的大作中提到】
: IMO, those RDBMS people constantly cannot understand the difference between
: a date and a dateformat. Those people always try to legitimate their
: implementation by spending several pages talking about Date Format. In fact
: for date / time storage you only need a integer / long, and the complexity
: of DateFormat can always be encapsulated in the JDBC driver (or other DB
: access API).

avatar
m*t
6

What, are you building some museum inventory management system?

【在 F****n 的大作中提到】
: Does anyone notice that most RDBMSs have unbelievable limits on Date/Time
: range they support? For example, mysql only supports date from 1000-01-01,
: so you cannot enter earlier dates in a Date/Time column.
: What the hell are those providers thinking? Is supporting Date/Time so big
: an issue that they have to resort to those stupid limits?
: What the solutions most people use?

avatar
A*o
7
and is't only accurate to the second...

【在 F****n 的大作中提到】
: Does anyone notice that most RDBMSs have unbelievable limits on Date/Time
: range they support? For example, mysql only supports date from 1000-01-01,
: so you cannot enter earlier dates in a Date/Time column.
: What the hell are those providers thinking? Is supporting Date/Time so big
: an issue that they have to resort to those stupid limits?
: What the solutions most people use?

avatar
F*n
8
只要STORE某时刻前后多少毫秒就行了,至于是哪年哪月,应该由一个具体的CALENDAR
来计算。

【在 c*****t 的大作中提到】
: 你说的估计一般使用可以足够。但是有些年 +/- 些 second,而如果真需要这种
: resolution 的话,还真是个麻烦事。
:
: between
: fact
:

avatar
g*g
9
这个东西不是有标准的吗?我记得是1970年1月1号?

CALENDAR

【在 F****n 的大作中提到】
: 只要STORE某时刻前后多少毫秒就行了,至于是哪年哪月,应该由一个具体的CALENDAR
: 来计算。

avatar
c*t
10
那是 unix system 的时间。并不是啥 standard 。

【在 g*****g 的大作中提到】
: 这个东西不是有标准的吗?我记得是1970年1月1号?
:
: CALENDAR

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。