Short Read: Daylight Savings is Problematic, Use UTC for Backend Systems

Benjamin Cane
CodeX
Published in
1 min readFeb 12, 2024

--

Daylight Savings is always painful in the context of software.

I firmly believe that backend systems should use Coordinated Univeral Time (UTC).

Why? Because it’s a standard that all types of systems understand. And it does not adjust with daylight savings time.

Whenever you store time in a database, use UTC.

I’ve seen many problems that stemmed from daylight savings. Data missing from file feeds, scheduled jobs not running, and more.

So, avoid this complexity by using a time that does not observe daylight savings.

Now, I’m not saying you should force all your users and user interfaces to be UTC. That would be a terrible experience.

The core of a system should use UTC, and where you interact with Users, convert to whatever local time you need to.

Enjoy this “Short Read”? Follow me on LinkedIn, for more bite-sized insights, opinions, and discussions on similar topics.

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Benjamin Cane
Benjamin Cane

Written by Benjamin Cane

Builder of payments systems & open-source contributor. Writing mostly micro-posts on Medium. https://github.com/madflojo

Responses (1)