Cronicle icon indicating copy to clipboard operation
Cronicle copied to clipboard

Add Date/Time Stamps to Log not change in timezone with CDT

Open javierordonezojeda opened this issue 3 years ago • 1 comments

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
---------------------------------------------------------------------------------

javierordonezojeda avatar Oct 31 '22 19:10 javierordonezojeda

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?

jhuckaby avatar Nov 03 '22 01:11 jhuckaby