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

HexagonJS doesn't support timezones. #378

Closed
gonaumov opened this Issue Jan 20, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@gonaumov
Copy link
Contributor

gonaumov commented Jan 20, 2017

When I worked on this PR:
#377
I run the tests and first I see the following errors:

✖ 5 tests failed

FAILED TESTS:
  date-localizer
    dateTimeLocalizer
      ✖ time: should localize a date object to return a time string of hh:mm
        PhantomJS 1.9.8 (Linux 0.0.0)
      AssertionError: expected '3:30' to equal '1:30'
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:210
          at assertEqual (/home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:782)
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:4192
          at /home/georginaumov/Documents/hexagonjs/target/test-library/lib/date-localizer/spec.js:66

      ✖ time: should localize a date object to return a time string of hh:mm:ss
        PhantomJS 1.9.8 (Linux 0.0.0)
      AssertionError: expected '3:30:00' to equal '1:30:00'
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:210
          at assertEqual (/home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:782)
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:4192
          at /home/georginaumov/Documents/hexagonjs/target/test-library/lib/date-localizer/spec.js:69

      ✖ stringToDate: should convert a localized date string back to a date object
        PhantomJS 1.9.8 (Linux 0.0.0)
      AssertionError: expected Wed, 06 Jan 2016 22:00:00 GMT to deeply equal Thu, 07 Jan 2016 00:00:00 GMT
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:210
          at assertEql (/home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:815)
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:4192
          at /home/georginaumov/Documents/hexagonjs/target/test-library/lib/date-localizer/spec.js:79

      ✖ stringToDate: should convert a localized date string back to a date object for inbuilt dates
        PhantomJS 1.9.8 (Linux 0.0.0)
      AssertionError: expected Wed, 06 Jan 2016 22:00:00 GMT to deeply equal Thu, 07 Jan 2016 00:00:00 GMT
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:210
          at assertEql (/home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:815)
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:4192
          at /home/georginaumov/Documents/hexagonjs/target/test-library/lib/date-localizer/spec.js:82

      ✖ stringToDate: should handle dates with short years correctly
        PhantomJS 1.9.8 (Linux 0.0.0)
      AssertionError: expected Wed, 06 Jan 2016 22:00:00 GMT to deeply equal Thu, 07 Jan 2016 00:00:00 GMT
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:210
          at assertEql (/home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:815)
          at /home/georginaumov/Documents/hexagonjs/node_modules/chai/chai.js:4192
          at /home/georginaumov/Documents/hexagonjs/target/test-library/lib/date-localizer/spec.js:85

I'm located in Bulgaria/Sofia - UTC+02:00
After this I tried to set my location to London (United Kindom) - UTC+00:00 and all test passed.
It seems that dateTimeLocalizer doesn't work properly with different timezones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment