mojombo / chronic

Chronic is a pure Ruby natural language date parser.
http://injekt.github.com/chronic
MIT License
3.24k stars 458 forks source link

Cannot parse 'yesterday at 9am' the day after DST starts. #329

Open keithepley opened 8 years ago

keithepley commented 8 years ago

In 0.10.2 and previous versions, 'yesterday at 9am' is returning nil the day after daylight saving time starts (3/14/2016).

'today at 9am' on 3/13/2016 and 'tomorrow at 9am' on 3/12/2016 both work as expected.

> Chronic.parse('yesterday at 9am') => nil

sponomarev commented 8 years ago

The same for CET timezone at Mar, 29

SagareGanesh commented 8 years ago

Hi @keithepley I am using a gem version 0.10.2 version of chronic, and Chronic.parse('yesterday at 9am') works correctly for me. see result.

Chronic.parse('yesterday at 9am') => 2016-08-22 09:00:00 +0530

Please provide your chronic gem version, so it ll help to reproduce issue and find out the solution. thanks

joevandyk commented 6 years ago

Today at 9 am pacific time, a few hours after daylight savings time started:

[1] pry(main)> Chronic.parse("tomorrow at 5am")
=> nil

I'm using 0.10.2

O-I commented 6 years ago

For what it's worth, I see this error today (March 12, 2018) running similar code around 9am Eastern the day after daylight saving time went into effect:

Chronic.parse("Yesterday at 9AM")
# => nil

I am also using 0.10.2.