On Thu, 02.10.14 15:19, Jan Synacek (jsyna...@redhat.com) wrote: > Lennart Poettering <lenn...@poettering.net> writes: > > On Thu, 02.10.14 14:39, Jan Synacek (jsyna...@redhat.com) wrote: > > > >> Introduce option to display time in UTC. > > > > Thanks! > > > > Applied! > > Thanks! I just realized that the patch was incomplete. There are at > least two different places that need to be patched - format_timestamp() > and format_timestamp_us() in src/shared/time-util.c. I'm not sure about > the rest (grepping localtime_r reveals some more uses). I would extend > the API of those calls by one boolean saying if they should use UTC or > not, however that would break API. Would that be OK? Or do you suggest > anything else?
Hmm, I'd probably rename format_timestamp() to format_timestamp_internal(), add the bool to it, and then make format_timestamp() just invoke that with the bool set to false, and then add format_timestamp_utc() which calls it with true. That way you don't have to patch that many invocations, and the invocations stay more readable. (breaking internal API is fine btw, we only need to be careful with exported API.) Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel