/etc/localtime dumb, log different timezones

I have own solution of this bug.
Syslog-ng have options
keep-timestamp which tell (when NO) set(write) actual time(real) of message to the log file.

I have create file /etc/syslog-ng.d/correct-time.conf

with content

options {
	keep-timestamp(no);
};

And for me is this best solution.

3 Likes

Do you have a (documentation) link about that supposedly TZ logging?

According to RFC 5424 - The Syslog Protocol and other sections of that RFQ there is no mandatory TZ aware logging by the source/originator.

It is recommended that the value of “0” be the default for the “tzKnown”

  • RFC5424 describes internet protocol
  • syslog on all UN*X systems I know work with local timezone
  • dnsmasq, syslog-ng, sentinel and possibly others work with local time, so there’s at least inconsistency here.

yes, it can be fixed at syslog level using:

would work, at least until the problem itself is fixed.

is nice, but the log above shows that odhcpd doesn’t use busybox nor procd logger

It describes the protocol that is utilised by syslog() call

This document describes the syslog protocol, which is used to convey event notification messages.


Which may very well because one userland implemented tzKnown="1" whilst other userland did not bother and defaults to tzKnown="0" instead or is coded to emit in UTC in any case.