<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">I'm working on some localization issues for a
customer. Typically my device localizes in 'C'. My code has
been hard-coded to convert epochs to local time in the format of
'DD-MM HH:MM:SS'. I've made some changes on the 'C' and Perl
side to read a configuration argument from the XML config that
formats the time via strftime(3) than the hard coded method. I went
with this because it allows more variability than forcing people
to enter formats in config like 'YYYY-MM-DD'. The only downside
is that they have to enter it like a format string. No problem,
tweak documentation.<br>
<br>
My question revolves around a few places where time is created. <br>
<br>
Case 1: date<br>
<br>
<b><font face="Courier New, Courier, monospace">[root@cs-buford]#
date<br>
Mon Jan 27 23:39:21 UTC 2014</font></b><br>
<br>
If the date is spelled out I do not think that will be a problem.<br>
<br>
<b><font face="Courier New, Courier, monospace">Case 2: syslog-ng<br>
<br>
Jan 27 23:38:30 cs-buford kernel: kjournald starting. Commit
interval 5 seconds<br>
Jan 27 23:38:32 cs-buford kernel: kjournald starting. Commit
interval 5 seconds</font></b><br>
<br>
Again, it is spelled out so I do not think it is going to be a
problem.<br>
<br>
This started when on our web app we displayed time as MM/DD/YY and
it confused my customer visiting from Africa. I have the Java
programmers working on that locale issue and it has been hard.
They work from India so they do not provide me input. They do
_exactly_ as I say even if I'm full of it. :P<br>
<br>
I've been googling syslog-ng date and I can not really see a
method to change the format from the standard BSD format to one I
specifiy in syslog.conf. Is this even possible? <br>
<br>
On date, it is doing exactly as it is supposed to so I am not
concerned with it. I just need to locate any perl code tham may
be using `date` (from shell exec) or POSIX::cmtime() and see if I
need to address those. <br>
<br>
This is an "embedded" system so locales do not really exist. Time
zones are limited to a few files in /var/share/zoneinfo so
anything outside of those must be old skool UTC. This has not
been a problem because of the hundreds I've deployed I've set them
all the UTC. <br>
<br>
There are very few OSS programs that write to their own log vs use
syslog. I think there is one. For that I can store the format in
/etc/date.fmt and modify the OSS program to read from that. That
will keep the OSS out of my library and I can simply comment mark
the changes vs non-changes like I normally would.<br>
<br>
Does anyone know if it is possible to specify a format for
syslog-ng other than the BSD standard one?<br>
<br>
Chris<br>
</font>
</body>
</html>