Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 14 Jan 2019 20:53:45 +0100
From: Michael Kaufmann <>
Subject: Re: Use local time in syslog() function

>> I have found a bug in the implementation of syslog(). It should use
>> the local time instead of UTC when sending the message to /dev/log.
>> So in src/misc/syslog.c, the call to gmtime_r() should be replaced
>> with localtime_r().
> This is not a bug; rather, use of local time there in glibc and other
> systems is a bug. Local time varies by the sending process and
> produces inconsistent and uninterpretable log messages. Moreover the
> syslog() function is not specified to depend on the environment and
> thereby is not allowed to call any function whose behavior is
> dependant on the environment.

Thank you for responding!

I agree that GMT would have been a better choice, but I think local  
time is also mandated by RFC 3164, : "The TIMESTAMP  
field is the local time". Or does this RFC not apply for syslog() on  

There's also this older discussion: - sorry, I have not  
found it before.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.