In this article, we will learn how to setting Dates and Timezones in your React application with Luxon, The New Moment.js Killer.
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):