]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: GMT offset not updated when entering/leaving DST
authorBenoit GARNIER <chezbunch+haproxy@gmail.com>
Sun, 27 Mar 2016 09:08:03 +0000 (11:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 13 Mar 2016 22:48:05 +0000 (23:48 +0100)
commitb413c2a759d9eb965ee90695c04e5a0119f01a81
tree51970131a5adebd8e58ad6ccca26377c8a72ee35
parent5c557d14d54a6d08c8c1624484cd7df2ed3c667e
BUG/MINOR: log: GMT offset not updated when entering/leaving DST

GMT offset used in local time formats was computed at startup, but was not updated when DST status changed while running.

For example these two RFC5424 syslog traces where emitted 5 seconds apart, just before and after DST changed:
  <14>1 2016-03-27T01:59:58+01:00 bunch-VirtualBox haproxy 2098 - - Connect ...
  <14>1 2016-03-27T03:00:03+01:00 bunch-VirtualBox haproxy 2098 - - Connect ...

It looked like they were emitted more than 1 hour apart, unlike with the fix:
  <14>1 2016-03-27T01:59:58+01:00 bunch-VirtualBox haproxy 3381 - - Connect ...
  <14>1 2016-03-27T03:00:03+02:00 bunch-VirtualBox haproxy 3381 - - Connect ...

This patch should be backported to 1.6 and partially to 1.5 (no fix needed in log.c).
include/common/standard.h
src/haproxy.c
src/log.c
src/standard.c