Describe the bug
From the man page:
set <time string>
Sets the SEL clock. Future SEL entries will use the time set by this command. <time string> is of the form "MM/DD/YYYY HH:MM:SS". Note that hours are in 24-hour form. It is recommended that the SEL
be cleared before setting the time.
From ipmi_sel.c:
const char *time_format = "%x %X"; /* Use locale-defined format */
[...]
/* Now let's extract time_t from the supplied string */
if (strptime(time_string, time_format, &tm) != NULL) {
ipmitool -V
ipmitool version 1.8.19
The issue:
> locale
LANG=en_US.UTF-8
> ipmitool sel time set "12/17/2023 09:19:11"
Specified time could not be parsed
> ipmitool sel time set "12/17/2023 09:19:11 AM"
12/17/2023 08:19:11 AM CET
> locale
LANG=de_DE.UTF-8
> ipmitool sel time set "12/17/2023 09:29:43 AM"
Specified time could not be parsed
> ipmitool sel time set "12/17/23 09:29:43"
12/17/23 08:29:43 CET
A patch to fix the man page is attached.
**Describe the bug**
From the man page:
```
set <time string>
Sets the SEL clock. Future SEL entries will use the time set by this command. <time string> is of the form "MM/DD/YYYY HH:MM:SS". Note that hours are in 24-hour form. It is recommended that the SEL
be cleared before setting the time.
```
From ipmi_sel.c:
```
const char *time_format = "%x %X"; /* Use locale-defined format */
[...]
/* Now let's extract time_t from the supplied string */
if (strptime(time_string, time_format, &tm) != NULL) {
```
> ipmitool -V
ipmitool version 1.8.19
**The issue:**
```
> locale
LANG=en_US.UTF-8
> ipmitool sel time set "12/17/2023 09:19:11"
Specified time could not be parsed
> ipmitool sel time set "12/17/2023 09:19:11 AM"
12/17/2023 08:19:11 AM CET
> locale
LANG=de_DE.UTF-8
> ipmitool sel time set "12/17/2023 09:29:43 AM"
Specified time could not be parsed
> ipmitool sel time set "12/17/23 09:29:43"
12/17/23 08:29:43 CET
```
A patch to fix the man page is attached.