Daylight savings impacting logs

77 views
Skip to first unread message

Nuno Costa

unread,
Mar 31, 2026, 9:54:25 AM (5 days ago) Mar 31
to Repo and Gerrit Discussion
Hi All,

After daylight savings were applied during last Sunday(one hour forward), we noticed that the Gerrit logs lines are still one hour behind.

This is happening on instances with 3.9.11 and also on 3.13.5.

I don't remember this happening on 3.4 and nothing being mentioned in previous release notes.

Is this expected?

Matthias Sohn

unread,
Mar 31, 2026, 10:27:01 AM (5 days ago) Mar 31
to Nuno Costa, Repo and Gerrit Discussion
AFAIK timestamps in Gerrit logs are in UTC which doesn't change when daylight savings are applied.

-Matthias

Nuno Costa

unread,
Mar 31, 2026, 12:20:00 PM (5 days ago) Mar 31
to Repo and Gerrit Discussion
Hi Matthias,

Our servers OS is configured to use EEST timezone and the only specific configuration in gerrit.config file related to logs are these ones that were automatically applied during an previous Gerrit upgrade(IIRC 2.16.x)
```
[container]
        javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
        javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
```

In some way, it seems Gerrit logging will default to the OS timezone.

It seems only sshd_log and httpd_log are affected. error_log seems to be in sync with OS.

```
$ date ; curl http://localhost:8080/gerrit/config/server/version?trace=test_log_after_DLS ; grep test_log_after_DLS /gerrit/gerrit/logs/httpd_log | tail -1
Tue Mar 31 18:48:33 EEST 2026
)]}'
"3.13.4-dirty"
127.0.0.1 [HTTP-347] - - [2026-03-31T17:48:33.557+03:00] "GET /gerrit/config/server/version?trace=test_log_after_DLS HTTP/1.1" 200 20 15 - "curl/7.61.1" 13 10 541048 - test_log_after_DLS

---

$ date; ssh -p 29418 someuser@localhost gerrit version --trace --trace-id test_log_after_DLS ; grep test_log_after_DLS /gerrit/gerrit/logs/sshd_log | tail -1
Tue Mar 31 18:49:04 EEST 2026
gerrit version 3.13.4-dirty
TRACE_ID: test_log_after_DLS
[2026-03-31T17:49:06.656+03:00] 676de16b [SSH gerrit version --trace --trace-id test_log_after_DLS (someuser)] someuser a/1000036 gerrit.version.--trace.--trace-id.test_log_after_DLS 5ms 7ms - 0 - 7ms 0ms 277440 test_log_after_DLS

---

$ date; ssh -p 29418 someuser@localhost gerrit version --trace --trace-id test_log_after_DLS ; grep test_log_after_DLS /gerrit/gerrit/logs/error_log | tail -1
Tue Mar 31 18:49:41 EEST 2026
gerrit version 3.13.4-dirty
TRACE_ID: test_log_after_DLS
[2026-03-31T18:49:41.292+03:00] [SSH gerrit version --trace --trace-id test_log_after_DLS (someuser)] DEBUG com.google.gerrit.server.logging.PerformanceLogContext : No performance summary available [CONTEXT forced=true SSH_SESSION="87b1f528" TRACE_ID="test_log_after_DLS" request="SSH" ]
```

This particular instance is running 3.13.4 but we see the same behavior on 3.13.5 and 3.9.11.

Restarting gerrit service will sync sshd and httpd logs with the current time.

Kenyon Ralph

unread,
Mar 31, 2026, 2:28:16 PM (5 days ago) Mar 31
to Repo and Gerrit Discussion
On Tuesday, March 31, 2026 at 9:20:00 AM UTC-7 Nuno Costa wrote:
Restarting gerrit service will sync sshd and httpd logs with the current time.

This is quite normal. Processes typically only read the environment once, at startup. You will likely find that your syslog daemon (rsyslog, etc.) won't switch timezone until a restart as well. Another good reason to configure hosts for UTC.

Nuno Costa

unread,
Apr 2, 2026, 10:29:06 AM (3 days ago) Apr 2
to Repo and Gerrit Discussion
But why only sshd_log and httpd_log are affected?

error_log had the correct time.
Reply all
Reply to author
Forward
0 new messages