Refactor timestamp handling

Handle all date/time stamps uniformly, taking in account the host
endianness. Respect the local time zone and the '-Z' option for
all ipmitool commands. Unify the date and time formatting.
Add correct handling of IPMI timestamps 'since system startup'
and for 'unspecified' timestamps.

Partially resolves ipmitool/ipmitool#23

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
This commit is contained in:
Alexander Amelkin
2018-07-26 19:40:44 +03:00
parent a4ac8ce4ab
commit f0d5c17ea7
16 changed files with 485 additions and 367 deletions

View File

@@ -88,7 +88,6 @@ char pidfile[64];
/* global variables */
int verbose = 0;
int csv_output = 0;
int time_in_utc = 0;
uint16_t selwatch_count = 0; /* number of entries in the SEL */
uint16_t selwatch_lastid = 0; /* current last entry in the SEL */
int selwatch_pctused = 0; /* current percent usage in the SEL */

View File

@@ -80,9 +80,7 @@ extern int ipmi_set_main(struct ipmi_intf * intf, int argc, char ** argv);
extern int ipmi_exec_main(struct ipmi_intf * intf, int argc, char ** argv);
extern int ipmi_lan6_main(struct ipmi_intf *intf, int argc, char **argv);
int csv_output = 0;
int time_in_utc = 0;
int verbose = 0;
struct ipmi_cmd ipmitool_cmd_list[] = {