Implicit time zones and the TZ environment variable
Frontend First
English - May 11, 2023 14:16 - 46 minutes - 42.4 MB - ★★★★★ - 18 ratingsTechnology technology web javascript ember ember.js software development design Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
Previous Episode: React email previews and radial gradients
Next Episode: What problems do React Server Components solve?
Sam shares some recent learnings around hydration mismatches when rendering time zoned dates on the server and the client. He talks about using the TZ environment variable to reproduce the issue locally, and how he solved his problem by avoiding impure format and transformation functions from date-fns.
Topics include:
0:00 - Intro0:50 - Sever vs. client time zone mismatches, and the TZ environment variable14:34 - Which date-fns functions are impure?23:56 - Using intervals and comparison to remove impuritiesLinks:
date-fnsdate-fns-tz