-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: None
-
None
DfTypeUtil.toDate()/toTimestamp()/toSqlDate()の修正。
但し、そもそも紀元前の日付を扱えないDBもある。
<OK>
H2
PostgreSQL
Oracle: 但し、紀元前2009を登録して再検索するとなぜか紀元前2010になる
<NG>
MySQL: 自動で西暦になる
DB2: 自動で西暦になる
SQLServer: 自動で西暦になるが、なぜか日付が一日進む
Derby: 自動で西暦になる
SQLServerのように未対応で日付がおかしくなるのはまだいいが、
Oracleのように対応してるのに日付(年)がおかしくなるのはつらい。
こんな記事があった。同じ現象が他の環境でもあるようだ。
http://marc.info/?l=castor-dev&m=114587287532514&w=2
oracle.sql.TIMESTAMP.timestampValue() does not return correct values for BC dates. The date is always off by one year from the expected/actual value when the actual date is in the BC era.