Managing times and dates in JavaScript has always been a bit of a mess.
For years, the only recourse for JavaScript developers was to use incredibly large libraries like moment-timezone or the newer and more functional date-fns-tz. Fortunately, browsers and Node.js have stepped up and now provide standard tools for handling time zones and data formatting in JavaScript without the need for external dependencies. Let's see these tools in action!
console.log(new Date("Fri Jan 20 2012 11:51:36 GMT-0500").toUTCString())