07 November 2021

What is Daylight Saving Time?

what is daylight saving time?

The daylight saving time switch happened this morning. For me in NYC, at 2AM the clocks jumped back and it was 2AM again an hour later (“fall back, spring forward”). It’s a familiar ritual, but also one that’s clouded in confusion.

First off, daylight saving time is the period during the spring/summer (not the winter when it gets dark an hour earlier). It’s not uncommon for someone to incorrectly swap EST (Eastern Standard Time) or PST with EDT (Eastern Daylight Time) or PDT when scheduling meetings, but you can always save the effort by simply writing “ET” or “PT” (unless you’re ambiguously having a meeting during the hour of the time switch!)

I prefer the daylight saving period, since it means I get sunlight later into the evening. Turns out the daylight saving period is almost 2/3 of the year (238/365 days)!

We’ve all heard someone or been someone who has mis-named the current top Netflix show as “Squid Games” instead of “Squid Game”. Similarly it’s not “Daylight Savings Time”, but “Daylight Saving Time”—no trailing “s”.

For more details, this Farmer’s Almanac post has a lot of interesting history on the topic, including a clarification on an often cited claim about farmers:

Farmers did not favor DST

Many Americans wrongly point to farmers as the driving force behind Daylight Saving Time. In fact, farmers were its strongest opponents and, as a group, stubbornly resisted the change from the beginning.

When the war was over, the farmers and working-class people who had held their tongues began to speak out. They demanded an end to Daylight Saving Time, claiming that it benefited only office workers and the leisure class. The controversy put a spotlight on the growing gap between rural and urban dwellers. As a writer for the Literary Digest put it, “The farmer objects to doing his early chores in the dark merely so that his city brother, who is sound asleep at the time, may enjoy a daylight motor ride at eight in the evening.”

I was always told it was farmers behind it all, but turns out it’s benefiting urban dwelling, tech folks like myself. Albeit daylight saving time (not to mention leap years and leap seconds) can cause some real confusion in code that deals with dates and times. If you’re working with dates and code (maybe you’ve seen dateknight #pun), my new favorite library is Luxon, which is built by the Moment.js folks. It leans heavily on the web browser’s Intl locale features to handle and render dates properly to each user regardless of where they are across the world. It’s best to store dates in UTC in the database, but render them in the correct locale on the client. Luxon also has some nice improvements beyond Moment.js, such as immutability of DateTime objects.

And finally a tale of suspense, horror, discovery, and redemption:




Did you find this helpful or fun? paypal.me/mrcoles
comments powered by Disqus

Peter Coles

Peter Coles

is a software engineer living in NYC who is building Superset 💪 and also created GoFullPage 📸
more »

github · soundcloud · rss