Testing · Senior · Question 68 of 75
How do you test date/time formatting for different locales and time zones reliably?
- ✓Correct answer: Fix the clock and set the time zone for the run (
TZ=UTC), and test formatting with explicit locales - 2Use the developer's local settings
- 3Skip such tests in CI
Explanation
Otherwise tests pass in one country and fail in CI or on daylight saving changes.