bb-Ricardo / check_redfish

A monitoring/inventory plugin to check components and health status of systems which support Redfish. It will also create a inventory of all components of a system.
MIT License
110 stars 30 forks source link

Negative timestamp #93

Closed SamuelePilleri closed 1 year ago

SamuelePilleri commented 1 year ago

This line puzzles me:

https://github.com/bb-Ricardo/check_redfish/blob/e55dd688e614a6e93abc361de171ff309cef8dee/cr_module/classes/plugin.py#L42

>>> from datetime import datetime
>>> datetime.fromtimestamp(-3600*48)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
>>>

Now what puzzles me is the motivation behind this change as can be seen in commit https://github.com/bb-Ricardo/check_redfish/commit/a13a2fb16d5715c5e4047ce967af89fb5a0be063. Was it intentional?

bb-Ricardo commented 1 year ago

Hi,

long time no answer. I had a look and I figured out why this has been put there. I pushed a change to 'next-release' which adds an explanation to the code.