Closed Cito closed 1 year ago
Can confirm. Was trying to parse "Sept. 14 at 7 AM PT" and got back "5 PM" local time when in fact it should've been "4 PM". Missed an event due to this, so I had to learn it the hard way 😅
I seem to be having the same problem. Two of our tests are off by an hour. I can confirm that this was the problem come tomorrow.
I see now that the ones I mocked time for failed earlier (2 of them) and now with one hour to go all of my tests that have a tolerance of less than 1 hour off are failing.
I expect to be able to confirm this when they all pass again tomorrow.
Indeed all tests pass again.
@wanasit any thoughts about a possible fix?
Hello @Slapbox @Prid13 @Cito. Thanks for reporting this. Sorry, I haven't been working on the project recently.
I have fixed those tests in 5ebfcc0e7f957260ca97f8a1d3056c7869b04844 (checking parsing result instead of JS date).
For now, I tested the change by running NodeJS with TZ
flag. For example:
TZ=CET npm test
I will think of a way to make automated tests better.
Thanks for your attention on this @wanasit. You do a great job maintaining this library and I really appreciate it!
It appears I misread the issue - it was my own tests failing in conjunction with chrono
. If we wanted to implement the fix on our own tests - is the core of the fix these lines? Is there not actually an issue in the library itself, but only the tests?
Thanks again for the great work!
When I run the tests on October 1st 2022 in Germany (CEST time zone), the following four tests are failing.
As far as I see, these tests somehow cannot cope with the fact taht they run in DST (CEST = Central European Summer Time).
Tested with the master branch as of October 1st 2022 (version 2.4.1).
Suggestion: It would be good if there were was a GitHub action running the tests in different time zones.
See also #439.