chronic icon indicating copy to clipboard operation
chronic copied to clipboard

Fix Daylight Savings parsing

Open stanhu opened this issue 6 years ago • 3 comments

Previously the offset change for Daylight Savings was unnecessarily added all the time, resulting in this discrepancy when the local time was set to UTC-7:

Time.parse('2020-11-01 00:00:00')
=> 2020-11-01 00:00:00 -0700
Chronic.parse('2020-11-01 00:00:00')
=> 2020-11-01 01:00:00 -0700

Each time we add an offset to a base time, we need to check whether this crosses Daylight Savings boundaries. Only if it does should we adjust the time by the offset.

Closes https://github.com/mojombo/chronic/issues/147

stanhu avatar Nov 23 '19 15:11 stanhu

@leejarvis Are you still maintaining this gem? If so, would you mind reviewing and pushing out an update? This bug causes a number of issues on gems that depend on it.

stanhu avatar Nov 23 '19 18:11 stanhu

@leejarvis Are you still maintaining this gem? If so, would you mind reviewing and pushing out an update? This bug causes a number of issues on gems that depend on it.

He haven't been checking this for years. My unpublished rewrite #347 doesn't have this specific issue.

davispuh avatar Nov 24 '19 17:11 davispuh

I'm afraid I no longer have time to maintain Chronic. I'm more than open to adding more contributors if anyone is willing though

leejarvis avatar Nov 26 '19 13:11 leejarvis