Hi,
For some reason, I need to work on Rails 1.2.3. I need to add hours
and mins to a particular DateTime Object.
I wrote the code on my machine using just Ruby (1.8.6)
puts DateTime.new(1900) —> 1900-01-01T00:00:00+00:00
puts DateTime.new(1900) + 30 —> 1900-01-31T00:00:00+00:00
The code seemed to have worked!
However, when I write the exact same code in my rails environment, for
some odd reason, the year field appears to be ‘0000’ instead of
‘1900’.
I wonder what is going wrong. May be conflicting Date, DateTime
libraries.
Any pointers on this?