Date comparison failure: expect(Date()).to(equal(Date())) inconsistent across locales
0 reputation · 04 Jan 2020, 03:25 UTC
The goal is to assert that two Date instances parsed from identical ISO strings without explicit time zone information are equal across all environments.
Nimble compares dates via timeIntervalSinceReferenceDate, which is zone‑independent, but the parsing step is not; local locale differences can produce distinct Date values.
Because Nimble lacks a public API for specifying a time zone when asserting date equality, developers must manually normalize dates, raising portability concerns for CI pipelines.
1. Does Nimble provide any API to specify a time zone for date expectations?
2. Should Nimble automatically normalize parsed dates to UTC before comparison?
3. What impact do these choices have on tests that run on CI systems configured to UTC while developers run locally in other zones?