mojombo/chronic — Issue #74: Chronic.parse("today 11:00am") returns nil on 2011-11-06
Author: redbeard0x0a
Created: 2011-11-06 17:58:55+00:00
State: open

I have been having issues around daylight savings time changes with Chronic calls. Last sunday I was having issues with Chronic returning nil, but I didn't capture any way to reproduce the error. I had problems with Chronic again today, here is what I was noticing in my Rails 3.0.10 app (MRI ruby 1.9.2 and 1.9.3)

Time.zone = "Central Time (US & Canada)"
Chronic.time_class = Time.zone
Chronic.parse("today 11:00am") # => nil
Chronic.parse("today 10:59am") # => Sun, 06 Nov 2011 10:59:00 CST -06:00
Chronic.parse("today 11:59am") # => nil
Chronic.parse("today 12:00pm") # => Sun, 06 Nov 2011 12:00:00 CST -06:00

I was trying to reproduce Chronic returning me nil on 10-30 using Timecop, but was unable to reproduce the errors, so I don't know if you will be able to use something like Timecop to validate this issue after today.

I also did this little test in irb (ruby 1.9.3)

require 'chronic'
Chronic.parse("today 11:00am") # => nil

My servers (ruby 1.9.2) are running with the timezone set to GMT at the OS level, the development machines (1.9.2 and 1.9.3) are set to Central Time at the OS level.