Open CromonMS opened 3 years ago
works for me? on OSX
irb(main):001:0> Chronic.parse('3/28/21 12:25am', endian_precedence: :little)&.end_of_month
=> Wed, 31 Mar 2021 23:59:59 PDT -07:00
irb(main):002:0> Chronic::VERSION
=> "0.10.2"
That's strange doesn't work on my VM (that's current version - but has never worked since the first post):
Linux ubuntu 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
but does work in production on:
Linux ubuntu 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
same version 0.10.2, what a strange quirk, must be a conflict with something on my VM..
I'm seeing something similar, and I'm guessing that it has something to do with time changes:
Chronic.parse("2023-03-12 12:15am")
=> nil
Chronic.parse("2023-03-12 1:15am")
=> 2023-03-12 00:15:00 -0800. <= NOTE off by 1 hour
Time.parse("2023-03-12 1:15am")
=> 2023-03-12 01:15:00 -0800 <= Time.parse works fine
Chronic.parse("2023-03-12 3:15am")
=> 2023-03-12 03:15:00 -0700
Daylight savings time started on 2023-03-12 - Chronic seems to be treating the entire day as PDT, when PDT actually starts at 2:00am.
This Date String does not seem to parse, but the day after it does:
Not sure why the first one isn't working, any ideas?
Thanks.