Menu

#437 sel: Fix "sel time set <time>"

version-1.8.17
closed-fixed
None
5
2016-04-10
2016-03-30
No

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
1 Attachments

Discussion

  • Puwen

    Puwen - 2016-03-31

    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?

     
    • Vasant Hegde

      Vasant Hegde - 2016-04-04

      I think that's different from "get/set time" command.

      -Vasant

       
      • Zdenek Styblik

        Zdenek Styblik - 2016-04-08

        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.

         
  • Zdenek Styblik

    Zdenek Styblik - 2016-04-08
    • status: open --> open-accepted
     
  • Zdenek Styblik

    Zdenek Styblik - 2016-04-10
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.