chronic icon indicating copy to clipboard operation
chronic copied to clipboard

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

Open keithepley opened this issue 8 years ago • 4 comments

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

keithepley avatar Mar 14 '16 21:03 keithepley

The same for CET timezone at Mar, 29

sponomarev avatar Mar 28 '16 13:03 sponomarev

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

SagareGanesh avatar Aug 23 '16 12:08 SagareGanesh

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

joevandyk avatar Nov 05 '17 18:11 joevandyk

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.

O-I avatar Mar 12 '18 13:03 O-I