mojombo/chronic — Issue #76: 24-hour format parses to tomorrow
Author: wulftone
Created: 2011-12-29 23:48:27+00:00
State: open

I've been using 24-hour format (military time) to do everything, but I discovered chronic doesn't like it so much.

Here's an example:

ruby-1.9.2-p290 :002 > Time.now
2011-12-29 15:44:57 -0800
ruby-1.9.2-p290 :003 > Chronic.parse 'now'
2011-12-29 15:45:05 -0800
ruby-1.9.2-p290 :004 > Chronic.parse '2pm'
2011-12-29 14:00:00 -0800
ruby-1.9.2-p290 :005 > Chronic.parse '14:00'
2011-12-30 14:00:00 -0800
ruby-1.9.2-p290 :006 >

Clearly, 14:00 should result in the same as 2pm, but it adds a day.