Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.38k stars 135 forks source link

Tests running not in UTC Timezone #912

Open basil-gor opened 3 weeks ago

basil-gor commented 3 weeks ago

Describe the bug I noticed, that tests are running not in the UTC timezone.

To Reproduce Steps to reproduce the behavior:

  1. Change the timezone on the local machine to a negative offset.
  2. Run tests.
  3. You will notice that some tests fail. For example tests/unit/components/Datepicker.spec.ts > Logic connection > Should select date

And most interesting, if you push a commit with changes while using a negative timezone, GitHub will also run these tests in the same timezone, causing them to fail. This issue occurred in my job here: https://github.com/Vuepic/vue-datepicker/actions/runs/9514864890/job/26227911555

Suggested Solution To ensure consistency and avoid timezone-related issues, we should configure tests to always run in the UTC timezone.

basil-gor commented 3 weeks ago

I didn't change the tests, but I pushed an unrelated commit that shouldn't have broken them, yet the tests failed. This means technically any commit made west of London's timezone could be affected.