-
Notifications
You must be signed in to change notification settings - Fork 8
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
Tests fail with NaN when run in GMT +08:00, possibly others #10
Comments
I'm able to reproduce this by switching to a handful of timezones and running the tests (example: ALMT (GMT +8)). Sometimes the problem shows itself as
Perhaps related to this are failures of test time intervals: AssertionError: ["1 year","1 day"] deepEqual ["1 year","2 days"]. I'm looking at http://www.iana.org/time-zones and seeing about generating an updated offset hash. |
Hmm, there's a problem with |
The format problem: This abbreviated timezone is looked up in the tzToOffset hash, which returns an offset in minutes from GMT. The solution here appears to be skipping the failing lookup, and just get the offset right away (like in https://github.com/kkaefer/chrono.js/blob/master/lib/chrono.js#L387). I'm unsure if there's a use in the regex for checking for the string. |
Nice find.
What does this mean exactly? Would we avoid this problem by setting a timezone? Should we be setting a timezone? |
@willwhite I've been attacking this by running the tests, and a format test has been among the consistent failures. Next steps are:
|
Tracking additional test failures in #12 |
Set system timezone to GMT +08:00 (for example) and test fail with the following:
The text was updated successfully, but these errors were encountered: