Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: JRuby 1.1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:jruby 1.1.1 (and 1.1)
RoR 2.0.2
activerecord-jdbcpostgresql-adapter 0.8
attachment_fu vendor plugin
jruby-openssql 0.2.2
windows xp pro
postgresql 8.2
Description
Hi -
When a user inputs a date using a 2 digit year, jruby (and/or activerecord-jdbcpostgresql-adapter) inserts a 1st century year into the database. For example:
ex) 04/28/08 <-- user input
in the controller:
db_insert = SomeActiveRecordModel.new(:the_date => params[:some_date])
db_insert.save
In the database, it is saved as:
0008-04-28
In native ruby, this same situation resolves to 20th century years - 2008
I've verified this behavior for timestamp with timezone and date data types
Perhaps unfairly giving this to Nick, but I think he can find this faster than I can.