Interview practice question
A date shows the wrong day for some users
Frontend Engineering · JavaScript Core · Intermediate
Users in some time zones see dates one day off, like a birthday displayed as the day before. Why, and how do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Date-only strings parsed as UTC midnight.
- Converted to local time shifts day.
- Store date-only values as strings/plain dates.
- Use Intl with timeZone.
- Temporal API in future.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.