sel: Fix "sel time set
Presently 'sel time set' doesn't account 'minute' difference between timezone.
So depending on host timezone it may set time to +/-30 mins. This patch adds
minute difference to delta_hour caluclation so that it sets time properly.
output without patch:
# ./ipmitool sel time get
03/24/2016 12:34:03
# ./ipmitool sel time set "03/24/2016 12:34:03"
03/24/2016 12:04:03
# ./ipmitool sel time get
03/24/2016 12:06:09
output with patch:
# ./ipmitool sel time get
03/30/2016 08:49:47
# ./ipmitool sel time set "03/30/2016 08:09:47"
03/30/2016 08:09:47
# ./ipmitool sel get
03/30/2016 08:09:57
Hi all,
IPMI Spec v2. had supported "Get/Set SEL Time UTC Offset" commands in Section 31.11a & 31.11b.
Is it better to consider to check these commands before account the GMT offset?
I think that's different from "get/set time" command.
-Vasant
Indeed it is and not all BMCs are going to support it. However, it should be implemented too.
I've verified the patch fixes the issue. I'll push it into git a bit later. Thanks.