I'm having a problem with NodeJS timezone. In my server.js file, i have the code below, but the time does not change to the correct timezone (-3h00)
process.env.TZ = 'America/Sao_Paulo';
console.log("Nova Data", new Date());
How can i fix this?
I'm having a problem with NodeJS timezone. In my server.js file, i have the code below, but the time does not change to the correct timezone (-3h00)
process.env.TZ = 'America/Sao_Paulo';
console.log("Nova Data", new Date());
How can i fix this?
It looks like you need to set the env before you start the app.
When you change it by process.env zthe change can be seen only by new Date().toLocaleTimeString()