Assuming you are referring to the missing century, it is a known issue/feature/problem.
https://github.com/rails/rails/pull/12458 https://github.com/rails/rails/commit/005d910624bbfa724b638426a000c8074d4201a2 It doesn't look like it is planned to be changed. On Mon, Aug 11, 2014 at 10:35 AM, Amiel Martin <am...@carnesmedia.com> wrote: > I'm not a core developer, but I have noticed that you are comparing how > ActiveRecord handles parsing a timestamp with Date.parse. > Try comparing with Time.zone.parse: > > > Time.zone.parse('2/2/2') > => Sat, 02 Feb 0002 00:00:00 LMT -07:52 > > > On Mon, Aug 11, 2014 at 10:14 AM, <jbourge...@pivotal.io> wrote: > >> Hi Rails Core, >> >> I was wondering how ActiveRecord is parsing dates, as it seems >> counterintuitive to how Ruby does it. >> >> RUBYCONSOLE:> Date.parse("2/2/2") >> => *Sat, 02 Feb 2002* >> >> $ rails g model receipt occurred_at:date >> >> RUBYCONSOLE:> Receipt.create!(occurred_at: "2/2/2") >> >> => #<Receipt id: 1, occurred_at: "*0002-02-02*", created_at: "2014-08-11 >> 17:06:18", updated_at: "2014-08-11 17:06:18"> >> >> RUBYCONSOLE:> Date.parse("0002-02-02") >> => Thu, 02 Feb 0002 >> >> >> What's up here? I'd like my receipt to be on printer paper, not stone >> tablets. >> >> >> Thanks! >> >> Josh Bourgeois >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-core+unsubscr...@googlegroups.com. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.