Regarding [PATCH] sysklogd: add -Z option to adjust message timezones
Peter Korsgaard
peter at korsgaard.com
Tue Feb 4 12:37:09 UTC 2020
>>>>> "Venkat" == Venkat K <venkat.konamki at gmail.com> writes:
> Hi Busybox team,
> I was using busybox version 1.15.2. One of my requirement is I need a
> timestamp in syslog message as localtime zone instead of GMT. I found below
> patch link to adjust the timezones.
> http://lists.busybox.net/pipermail/busybox/2017-May/085437.html .
>> * + if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
> *>* + now = mktime(&nowtm) - timezone;
> *>* + timestamp = ctime(&now) + 4; /* skip day of week */
> *>* + } else {
> *>* + now = 0;
> *>* + timestamp = msg;
> *>* + }*
> But i didn't get where *timezone *is defined and what it is contained, Can
> you help us where it is defined and what it is contained.
I don't know about that patch (which hasn't been merged), but you can
run syslogd with the -t option to get it to re-timestamp syslog messages
with the timestamp using whatever timezone syslogd is running under.
--
Bye, Peter Korsgaard
More information about the busybox
mailing list