| title | impact | impactDescription | tags |
|---|---|---|---|
Timezone Handling in Tests |
HIGH |
Timezone bugs are hard to reproduce without consistent test environments |
testing, timezone, consistency |
When running tests in the Cal.com repository, use the TZ=UTC environment variable:
TZ=UTC yarn testThis ensures consistent timezone handling and prevents timezone-related test failures that might occur when tests are run in different environments or by different developers with varying local timezone settings.
- Tests may pass locally but fail in CI (or vice versa)
- Date/time assertions become unpredictable
- Debugging timezone issues is time-consuming
# Unit tests
TZ=UTC yarn test
# Specific test file
TZ=UTC yarn vitest run path/to/file.test.ts
# E2E tests (already configured in yarn e2e)
PLAYWRIGHT_HEADLESS=1 yarn e2e