Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2016 17:14:35 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Changing Syslog timestamp to UTC
Message-ID:  <569bfc21-0193-09da-bb32-9acb25621275@freebsd.org>
In-Reply-To: <A17E71A3-03D8-4016-8142-3946E482E353@gmail.com>
References:  <A17E71A3-03D8-4016-8142-3946E482E353@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--oSeCqQ1o8itnOj52dTiVS3crSVksKAcIn
Content-Type: multipart/mixed; boundary="eC2RstjN9QhADMPFe8q7PkbOjw2iKVB4r";
 protected-headers="v1"
From: Matthew Seaman <matthew@freebsd.org>
To: freebsd-questions@freebsd.org
Message-ID: <569bfc21-0193-09da-bb32-9acb25621275@freebsd.org>
Subject: Re: Changing Syslog timestamp to UTC
References: <A17E71A3-03D8-4016-8142-3946E482E353@gmail.com>
In-Reply-To: <A17E71A3-03D8-4016-8142-3946E482E353@gmail.com>

--eC2RstjN9QhADMPFe8q7PkbOjw2iKVB4r
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 11/25/16 17:06, San s wrote:
> Tried exporting TZ=3DUTC and restarting syslogd. This shows the syslogd=

> restart related messages in UTC, but not rest of the messages. They
> are still showing up as system timezone.

That's because the timestamp isn't generated by syslogd, but by the
program that logs the message.  This is what the -T option exists for --
except it only applies to system log messages received across the network=
=2E

About the only way I can suggest for solving this is to use rsyslog from
ports -- I believe that has the capability of changing the timestamp to
when it received the log messages, rather than when it was originally
generated.  Plus it uses a rather more sensible timestamp format so the
date-time is a single column in the output, and you can tell what the
timezone offset from UTC was.

	Cheers,

	Matthew



--eC2RstjN9QhADMPFe8q7PkbOjw2iKVB4r--

--oSeCqQ1o8itnOj52dTiVS3crSVksKAcIn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAlg4cYAACgkQAFE/EOCp
5OeZ5Q/8C1H/3HMRi6uaVMa1j99ddzamnxgcHe64HXx0DcDiUOnCFgw484qmM28J
857HAxqlbA2FZiCKaWwL01BbNSr87B27ZvEpqcQtHbT90yWA+j0YjHdRWY4vfB7h
qoPWUV6EPYX7AQFYKLeaQTkDLHvCiNtf8u86zXOBe4rhEdLfw4LJ6qtcOkSLfXSZ
6nlNDfRqsnlh17Sb6RFpQ37QM5ZNNeOo2/YFTrX7/Txq/WCiDnKl0ygWLPQm2zi3
P8jypF/4bSE17hD/6eyelfF4h1i42s+X7haj+N+AObaCzP8z4k59/5sn417XpBTD
7YiUw5G+bxrGFdOb8gQ0vpWFogLYIX4PqNcwJmkhUuYzuKc9buTpk0g0LQHp9jGk
ZXsDd0wbqOkd2c1ENCcxVd8uaOnMR2zFq3YcvB+EbU0CTDt+i/9D1bYU61FIq3Jo
GRagZPtr1cHvntlXZeUI6b4u1FsXkkizyUuYd3G+zj60q3t+tpwakudWHsNS0r+a
GttDKSELQw+IFE/+SivCzaPUcXucu5eNyghDKbT64gbJQtx8WguIXWvG2PuMGwUD
Txmjkhso6u4+I+GL5K3/380lviF5kf5+91rKRfO7dF1qFhwPGBMh8ZbZsc82kEP9
GUzp72hyqF18S5LKxLmzkggoA6NmxLph84heREv9qR0lfHjcRi8=
=V/b1
-----END PGP SIGNATURE-----

--oSeCqQ1o8itnOj52dTiVS3crSVksKAcIn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?569bfc21-0193-09da-bb32-9acb25621275>