Why does my express app log events not using localtime?

Viewed 28

I have a simple express app with a couple of pages and some api calls (invoked from said pages). There's postgres DB holding the data.

I'm logging activity using morgan, with the standard setting of "common". Yesterday I noticed there was a 3hr difference with my local time, and I realized it was because the timezone set in the (Linode, Ubuntu 20.04) server is UTC. I changed the timezone using timedatectl:

               Local time: Tue 2021-09-14 08:31:17 -03
           Universal time: Tue 2021-09-14 11:31:17 UTC
                 RTC time: Tue 2021-09-14 11:31:18
                Time zone: America/Argentina/Buenos_Aires (-03, -0300)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

The thing is, the time in my logs continues to be UTC (or RTC?). I rebooted the server and restarted the app after the timezone change, but nothing changed.

Can anyone see what I'm doing wrong?

Thanks!

0 Answers
Related