API Design · Middle · Question 55 of 75
How should an API handle time zones in inputs and outputs?
- 1Return times as local strings for each country
- ✓Correct answer: Store and return timestamps in UTC with an offset (
Z), and accept the user's time zone separately when local dates matter - 3Use the server's local time without offsets
Explanation
Calendar-style data (birthdays, opening hours) may need dates without times or explicit IANA zones like Europe/Kyiv.