flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
168 stars 50 forks source link

consider using local time for eventlog formatter ISO 8601 format #6421

Closed grondo closed 2 weeks ago

grondo commented 2 weeks ago

Currently the eventlog formatter used by flux job eventlog, flux kvs eventlog and flux job wait-event formats the iso time format using UTC time always (using the standard suffix Z). This is slightly inconvenient, though, because other system tools like dmesg and log files such as /var/log/messages present ISO time in the current time zone + offset, e.g.:

2024-11-07T15:57:47.964255-08:00 fluke65 systemd[1]: Started Housekeeping for Flux job fEi29GDEQPZ.

This makes it unnecessarily difficult to compare timestamps between eventlogs and system events.

It might be simplest to just have the ISO output use the current timezone -- appending the offset still conforms to ISO 8601 AFAIK, and you could get UTC easily by changing the setting of the TZ variable...

The same argument could perhaps be made for flux dmesg as well..