Skip to main content
The Bike Shed

457: Time Zones with Sally Hall

46 min episode · 2 min read
·

Episode

46 min

Read time

2 min

AI-Generated Summary

Key Takeaways

  • Test Strategy for Time Zones: Write tests using time zones different from your local environment and CI server (like Chicago time when working in Eastern) to catch time zone bugs locally before deployment, preventing false positives from matching environments.
  • Database Performance for Scheduling: Postgres materialized views with 8 million time slots refresh faster than Ruby calculations that took 45 minutes. Use database-level time math with debounced refresh jobs limited to one concurrent execution for appointment scheduling systems.
  • Time Object Math Rules: Never manually add offset hours to Ruby time objects—the Unix timestamp already handles conversions automatically. Adding offsets creates incorrect times because you're shifting the underlying timestamp when no math is needed, only metadata changes.
  • Display Strategy for Multi-Timezone Apps: Always show time zone abbreviations next to timestamps (like 9:00 AM EST) when users and service providers operate across different time zones, preventing confusion about whether times reflect user or provider location.

What It Covers

Sally Hall and Joelle Kenville explore time zone complexity in software development, covering daylight savings bugs, scheduling systems, time-of-day calculations, database optimization strategies, and why developers should never write custom time math.

Key Questions Answered

  • Test Strategy for Time Zones: Write tests using time zones different from your local environment and CI server (like Chicago time when working in Eastern) to catch time zone bugs locally before deployment, preventing false positives from matching environments.
  • Database Performance for Scheduling: Postgres materialized views with 8 million time slots refresh faster than Ruby calculations that took 45 minutes. Use database-level time math with debounced refresh jobs limited to one concurrent execution for appointment scheduling systems.
  • Time Object Math Rules: Never manually add offset hours to Ruby time objects—the Unix timestamp already handles conversions automatically. Adding offsets creates incorrect times because you're shifting the underlying timestamp when no math is needed, only metadata changes.
  • Display Strategy for Multi-Timezone Apps: Always show time zone abbreviations next to timestamps (like 9:00 AM EST) when users and service providers operate across different time zones, preventing confusion about whether times reflect user or provider location.

Notable Moment

The team discovered their appointment scheduling system generated 8 million possible time slots, initially worrying about database size, but found storing them in a materialized view proved far more efficient than attempting Ruby-based calculations that consumed 45 minutes per operation.

Know someone who'd find this useful?

You just read a 3-minute summary of a 43-minute episode.

Get The Bike Shed summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from The Bike Shed

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

You're clearly into The Bike Shed.

Every Monday, we deliver AI summaries of the latest episodes from The Bike Shed and 192+ other podcasts. Free for up to 3 shows.

Start My Monday Digest

No credit card · Unsubscribe anytime