If you’re a (senior) developer you’ve probably been there: participating in meetings or discussions about how to handle dates and timezones in your applications. It can be a hard topic to discuss and especially if your application has several data sources containing dates with an origin in different timezones.

We all know timezones exist and how they work; kind of. We’ve all had that phone call from a friend or relative that was holidaying in another timezone: “What time is it over there? Oh, 5 in the afternoon? That’s funny, it’s only 9 in the morning here!”.

But that’s it.

When dates and timezones become part of our development, things can quickly become messy. Difficult. And frustrating.

But it’s not that hard.

Really, it isn’t.

Before we really take off I’ll describe a couple of items you should familiarize yourself with (feel free to skip ahead):

  1. Timezone
  2. UTC
  3. UTC offset
  4. Luxon vs. Moment.js

#javascript

Meet Luxon, The New Moment.js Killer
1.75 GEEK