Company
Date Published
July 18, 2024
Author
Henry Course
Word count
2561
Language
English
Hacker News points
None

Summary

Building an on-call product requires careful consideration of time-related complexities, including local time, time offsets, and timezones. The scheduler must accurately calculate which users are on shift at any given time for a specific schedule configuration, taking into account factors such as DST changes, timezone differences, and user preferences. To achieve this, the system uses Postgres to handle timezone conversion and instants, with the application layer working with instants as much as possible. The UI displays times in local time when necessary, while the scheduler is designed to be flexible and fast, with a robust testing strategy that includes unit testing, snapshot testing, runtime auditing, and architectural considerations.