risuorg / risu

Automation Troubleshooting Framework to validate and report configuration, software installed, etc with bash, python, and your language of choice.
https://risuorg.github.io
GNU General Public License v3.0
106 stars 35 forks source link

Runtime metadata with local time instead of UTC #823

Closed gitkent closed 2 years ago

gitkent commented 2 years ago

What does happen/fail? We generate an html report with runtime metadata time always show UTC time.

How should it be? It should be showing the local time as most users using their own local time instead of UTC time.

Additional info https://github.com/risuorg/risu/blob/master/risuclient/shell.py#L1379 https://docs.python.org/3/library/datetime.html#datetime.datetime.now

github-actions[bot] commented 2 years ago

Thank you for raising this issue

iranzo commented 2 years ago

Hi, The line indicated is when the report is generated, but that's only relevant for the version of the framework being used.

I think that a 'sysinfo' test that reports the system time either on live system or the stored time for the sosreport generation will be more useful, and showing that one based on the local timezone of the host being analyzed.

Additionally a whenlocal field could be added to the generation itself, would that make sense to you?

iranzo commented 2 years ago

image

The example... local time is in CEST in my system, and the plugin reports the date recorded in the sosreport being analyzed

gitkent commented 2 years ago

Hi,

I am not sure about the sosreport time as we are not using sosreport yet. The one that I am interested for now is the 'when' time as shown in screenshot.

Screen Shot 2022-10-27 at 9 36 38 am

as you mentioned, an addition of whenlocal can be a good idea.

Thanks

iranzo commented 2 years ago

image

That's with whenlocal... about sosreport or not, the check will report both on live executions and on sosreport ones. Note that by default OpenShift Cheks is ignoring the internal risu plugins and just leaving the ones in the repository, so you might need to adjust the filters for it

iranzo commented 2 years ago

@gitkent check the PR #824 and test it so that I can merge it

iranzo commented 2 years ago

:tada: This issue has been resolved in version 1.8.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: