1

I can not manage to get the same time in nodejs as on the digitalocean droplet. I'm running Docker 19.03.12 on Ubuntu 20.04. When I log the date on the server I get the correct time

root@rtws-backend:~# date
Thu Mar 11 16:28:45 CET 2021

When going into nodejs on the server the time is one hour behind the actual time

root@rtws-backend:~# node
Welcome to Node.js v15.3.0.
Type ".help" for more information.
> new Date()
2021-03-11T15:29:54.625Z

My Settings:

root@rtws-backend:~# timedatectl
Local time: Thu 2021-03-11 16:42:19 CET
Universal time: Thu 2021-03-11 15:42:19 UTC
RTC time: Thu 2021-03-11 15:42:20
Time zone: Europe/Zurich (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no

In the .env File TZ is set to Europe/Zurich

Any Ideas?

0 Answers0