runt icon indicating copy to clipboard operation
runt copied to clipboard

Rails DateTime functions do not work properly

Open ssandeep opened this issue 10 years ago • 1 comments

After adding runt gem to the rails project, some of the functions provided by Rails' DateTime do not work properly.

For eg, DateTime.now + 1.day #gives some random date in 2035 DateTime.now + 2.hours #gives some random date in 2033

Any idea what might fix these issues?

ssandeep avatar Jun 10 '15 09:06 ssandeep

This started to happen in rails 4. What's happening is 1.day is returning a Fixnum instead of a Duration object.

sundus-y avatar May 26 '16 20:05 sundus-y