lennym/moment-business-time

Test fail on desktop with timezone CEST

Opened this issue · 1 comments

I am in the Europe/Amsterdam Timezone. When I run npm test, one test fails. When I switch my desktop to a none summer/wintertime zone (like GMT) the tests pass.

holidays
      ✓ does not count holidays as working days
      1) does not include holidays when adding working time
      ✓ does not include holidays when adding calculating diffs
      ✓ supports holidays as wildcards


  63 passing (120ms)
  1 failing

  1) moment.business-hours holidays does not include holidays when adding working time:

      AssertionError: expected '2015-03-02 13:00:00.000' to equal '2015-03-02 12:00:00.000'
      + expected - actual

      -2015-03-02 13:00:00.000
      +2015-03-02 12:00:00.000
      
      at Context.<anonymous> (test/spec.business-hours.js:474:91)

Thanks for raising this. I think the "best" approach is probably to have a means of allowing a user to use moment-timezone as opposed to the basic moment module, but I'm not 100% sure on the best way to do that as I don't actually use this module (or moment) on a regular basis.

I'll have a bit of a think on it.