Closed csabahenk closed 4 years ago
A patch https://review.gluster.org/24219 has been posted that references this issue.
Indicate timezone offsets in timestamps
Logs and other output carrying timestamps will have now timezone offsets indicated, eg.:
[2020-03-12 07:01:05.584482 +0000] I [MSGID: 106143] [glusterd-pmap.c:388:pmap_registry_remove] 0-pmap: removing brick (null) on port 49153
To this end,
A new utility function has been added, gf_time_fmt_tv(), that takes a struct timeval pointer (*tv) instead of a time_t value to specify the time. If tv->tv_usec is negative,
gf_time_fmt_tv(... tv ...)
is equivalent to
gf_time_fmt(... tv->tv_sec ...)
Otherwise it also inserts tv->tv_usec to the formatted string.
This change does not do the following:
Change-Id: I0af73ab5d490cca7ed8d07a2ce7ac22a6df2920a Updates: #837 Signed-off-by: Csaba Henk csaba@redhat.com
Both Issue description, and also the patch commit message are detailed to provide both DesignSpec, and Documentation. hence the Label :-) Thanks.
Yay. The log files now specify what offset from UTC the entries are. Kind of moot when you can't change the offset of the log files at all so they will always be UTC. Everything else logs in local time going by the system TZ but this software because the dev's seem to absolute refuse to do this.
The current convention in Glusterfs is to render time values to date strings in timezone UTC. This was adopted to avoid ambiguity regarding temporal data -- assuming all dates in logs, dumps, output are UTC, then it's well defined what time value is referred by them, regardless of the place of origin.
However, this is a leaky abstraction, as
So while UTC is default, nothing indicates if Glusterfs has been started with local time.
The UTC convention is also confusing UI, because the general expectation is that locally originated time values are rendered as local time; therefore:
All these issue can be came over just by explicitly indicating time offset along dates.