-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguous time when parsing dates with daylight savings using Chronic #23
Comments
Quick fix for floraison#23
@stanhu thanks for the patch, as you've seen, it's merged. I will dig a bit deeper tomorrow morning (HK time). I will try to reproduce your root issue, since Time.active_support_zone = 'America/Chicago'
t = EtOrbi.parse('2020-11-01 00:00:00') is not making any problem on my system. I'll think about how to trigger that here. I also have to look at the CI appveyor :-( When I have something decent, I will release. Thanks so far. |
@jmettraux Thanks! Did you remember to |
Hmm, we might want to revert #24 since the extra |
Yes, Lines 241 to 243 in 8425ca5
|
It's possible the time zone on your system also matters. |
I've submitted mojombo/chronic#396 to fix this problem. |
@stanhu wrote:
May I know what Ruby version, what OS, and what timezone combination exhibits the problem for you? Thanks in advance. |
@stanhu wrote:
Yes, I first worked with your spec, but it didn't fail for me, Chronic or no-Chronic. Sorry, I had to change it to reflect the true purpose of |
On Linux, it looks like setting the system clock via
|
@stanhu What Linux flavour, what Ruby version, what Chronic version? Thanks in advance. |
@jmettraux I've been using Ubuntu 18.04, Ruby 2.6.3, and Chronic v0.10.2. |
Thanks for all the investigation work and the contributions. Since it's Chronic issue, I am closing this one. |
Here's a test that reproduces the problem:
It fails with:
I described the problem in-depth in https://gitlab.com/gitlab-org/gitlab/issues/37014#note_248974118.
Essentially, when Chronic is used, the time is advanced unnecessarily:
I propose two ways to solve this here:
Chronic is probably causing issues because it doesn't handle Daylight Savings well: mojombo/chronic#147
The text was updated successfully, but these errors were encountered: