[systemd-devel] [PATCH] journalctl: add --utc option

Josh Triplett josh at joshtriplett.org
Thu Oct 2 12:51:42 PDT 2014


On Thu, Oct 02, 2014 at 09:11:39PM +0200, Lennart Poettering wrote:
> On Thu, 02.10.14 11:56, Josh Triplett (josh at joshtriplett.org) wrote:
> 
> > On Thu, Oct 02, 2014 at 09:36:46AM +0200, Jan Synacek wrote:
> > > Introduce option to display time in UTC.
> > 
> > Does "TZ=UTC journalctl" not do the right thing?  A quick test here
> > suggests that it does.  That seems preferable to teaching individual
> > tools to special-case UTC.
> 
> Not sure i agree. --utc really should only have an effect on our own
> output, and that's a good thing. If you set $TZ you end up changing
> much much more, for example the logic of glibc's own syslog() and what
> it passes on, and we shouldn't influence that.

True, but in the case of journalctl, which just queries and outputs
journal data, what would TZ=UTC affect that you *wouldn't* want?
journalctl shouldn't be calling syslog().

- Josh Triplett


More information about the systemd-devel mailing list