bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong date format in syslog


From: SEKINE Tatsuo
Subject: Re: wrong date format in syslog
Date: Wed, 30 Apr 2003 12:27:39 +0900

I wrote:
> Accroding to RFC 3164(ftp://ftp.rfc-editor.org/in-notes/rfc3164.txt),
> the timestamp should be in the format of "Mmm dd hh:mm:ss" (without
> the quote marks). Where "Mmm" is the English language abbreviation for
> the month of the year.
> 
> But glibc-2.3.1 implements it as "%h %e %T" (in strftime() format).
> In non-English locale, syslog daemon incorrectly parse those message

patch against glibc-2.3.2 is available from below:
  http://www.sdri.co.jp/~tsekine/soft/glibc-syslog.patch

It is tested on RedHat 9 (GNU/)Linux system only.

  $ echo $LANG
  ja_JP.eucJP

  $ logger "test message 1"
  $ sudo tail /var/log/messages
  ...
  Apr 30 12:00:41 myhost <%h> 30 12:00:41 tsekine: test message 1
 
  $ LD_PRELOAD=patched-libc.so TZ="Asia/Tokyo" logger "test message 2"
  $ sudo tail /var/log/messages
  ...
  Apr 30 12:18:47 myhost tsekine: test message 2

Of course, <%h> is abbr. of "April" in ja_JP.eucJP locale
which is not printable in 7bit ascii.

--
SEKINE Tatsuo:
 http://www.sdri.co.jp/~tsekine/
 address@hidden(business)       System Design & Research Institute Co.,Ltd.
 address@hidden(private)        Yokohama Linux Users Group




reply via email to

[Prev in Thread] Current Thread [Next in Thread]