I've been struggling for some time to get setZone to work using the luxon library on a Mongo Atlas trigger. It's been a real nightmare. I have downgraded and upgraded versions of luxon in Atlas without any success. Currently, I'm using version 2.0.1 because the latest version of luxon has issues with Intl in Atlas. Any help would be appreciated.
const { DateTime } = require('luxon');exports = async function() { const dt = DateTime.now(); // dt returns eg) 2024-11-25T14:01:55.223+00:00 const dtInNewYork = dt.setZone('America/New_York'); // here is the issue console.log(dtInNewYork.toString()); // Invalid DateTime};