gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.73k stars 1.08k forks source link

Indicate timezone offset in formatted timestamps #837

Closed csabahenk closed 4 years ago

csabahenk commented 4 years ago

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.

gluster-ant commented 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,

This change does not do the following:

Change-Id: I0af73ab5d490cca7ed8d07a2ce7ac22a6df2920a Updates: #837 Signed-off-by: Csaba Henk csaba@redhat.com

amarts commented 4 years ago

Both Issue description, and also the patch commit message are detailed to provide both DesignSpec, and Documentation. hence the Label :-) Thanks.

crkinard commented 2 years ago

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.