From owner-freebsd-questions@freebsd.org Fri Nov 25 17:14:59 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 756ACC54175 for ; Fri, 25 Nov 2016 17:14:59 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 317C9A4D for ; Fri, 25 Nov 2016 17:14:59 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from ox-dell39.ox.adestra.com (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 7E68F21FE for ; Fri, 25 Nov 2016 17:14:48 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/7E68F21FE; dkim=none; dkim-atps=neutral Subject: Re: Changing Syslog timestamp to UTC To: freebsd-questions@freebsd.org References: From: Matthew Seaman Message-ID: <569bfc21-0193-09da-bb32-9acb25621275@freebsd.org> Date: Fri, 25 Nov 2016 17:14:35 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oSeCqQ1o8itnOj52dTiVS3crSVksKAcIn" X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,RCVD_IN_RP_RNBL, RDNS_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 17:14:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oSeCqQ1o8itnOj52dTiVS3crSVksKAcIn Content-Type: multipart/mixed; boundary="eC2RstjN9QhADMPFe8q7PkbOjw2iKVB4r"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: <569bfc21-0193-09da-bb32-9acb25621275@freebsd.org> Subject: Re: Changing Syslog timestamp to UTC References: In-Reply-To: --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--