Add Date/Time Stamps to Log not change in timezone with CDT
Summary
if you enable the option "Add Date/Time Stamps to Log" and youe use a timezone with CDT, when time change from Summer time to winter , dates in log not match with other dates
Steps to reproduce the problem
1 - Set schedulle with timezone with CDT 2- Affter the change moment you see the dates not match in log For example:
"Date/Time: 2022/10/31 09:33:00 (GMT-5)" has bad TZ, the correct date is "Date/Time: 2022/10/31 08:33:00 (GMT-6)"
--------------------------------------------------------------------------------
# Job ID: jl9wvs12ndj
# Event Title: XXXXXX
# Hostname: YYYYYY
# Date/Time: 2022/10/31 09:33:00 (GMT-5)
[2022/10/31 08:33:00] PROD: 0
[2022/10/31 08:33:00] QA: 1
[2022/10/31 08:33:00] Mon Oct 31 08:33:00 CST 2022
---------------------------------------------------------------------------------
Your Setup
timedatectl
# timedatectl
Local time: Mon 2022-10-31 13:07:12 CST
Universal time: Mon 2022-10-31 19:07:12 UTC
RTC time: Mon 2022-10-31 19:07:12
Time zone: America/Mexico_City (CST, -0600)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
Affter restart the service the problem has solved.
Operating system and version?
NAME="Red Hat Enterprise Linux"
VERSION="8.3 (Ootpa)"
Node.js version?
v16.14.0
Cronicle software version?
0.9.13
Are you using a multi-server setup, or just a single server?
Single Server
Are you using the filesystem as back-end storage, or S3/Couchbase?
Couchbase
Can you reproduce the crash consistently?
Yes Affter restart the service the problem has solved.
Log Excerpts
--------------------------------------------------------------------------------
# Job ID: jl9wvs12ndj
# Event Title: XXXXXX
# Hostname: YYYYYY
# Date/Time: 2022/10/31 09:33:00 (GMT-5)
[2022/10/31 08:33:00] PROD: 0
[2022/10/31 08:33:00] QA: 1
[2022/10/31 08:33:00] Mon Oct 31 08:33:00 CST 2022
---------------------------------------------------------------------------------
Not much we can do about this. I believe Node.js caches the server TZ and doesn't support changing it from underneath.
Maybe I can add the option to log the date/time in UTC? Or just raw Epoch seconds?