Weird weird DateTime object issue in rails 1.2.3


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 —> 1900-01-01T00:00:00+00:00
puts + 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

I wonder what is going wrong. May be conflicting Date, DateTime

Any pointers on this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs