Skip to content
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

zonedDateTimeFns.getOffset() only handles some values correctly #87

Open
kolton-musgrove opened this issue Jan 31, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kolton-musgrove
Copy link
Collaborator

      it('ignore defers to disambiguation option', () => {
        const offset = 'ignore'
        assert.equal(
          zonedDateTimeFns.getOffset(
            zonedDateTimeFns.with(doubleTime, { hour: -2, minute: -30 }, { offset, disambiguation: 'earlier' })
          ),
          '-02:30'
        )
        assert.equal(
          zonedDateTimeFns.getOffset(
            zonedDateTimeFns.with(doubleTime, { hour: -3, minute: -30 }, { offset, disambiguation: 'later' })
          ),
          '-03:30'
        )
      })

The previous two tests should correctly create an offset of 2.5 hours and 3.5 hours, respectively, but the second assertion returns a value of 2.5-hour offset.

@kolton-musgrove kolton-musgrove added the bug Something isn't working label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant