11
29
Fork
You've already forked ipmitool
33

Description "sel time set" invalid #18

Closed
opened 2023年12月17日 11:26:59 +01:00 by jff · 0 comments

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.
Sign in to join this conversation.
No Branch/Tag specified
master
bugfix/43-Fix-timezone-and-DST-in-SEL
pages
bugfix/fix-ci-builds
feature/refactor-sdr-name-handling
cleanup/nm
feature/add-support-for-boot-mailbox
codefactor
bugfix/26
IPMITOOL_1_8_19
IPMITOOL_1_8_18
IPMITOOL_1_8_17
IPMITOOL_1_8_16
IPMITOOL_1_8_15
IPMITOOL_1_8_15RC1
IPMITOOL_1_8_14
IPMITOOL_1_8_14RC2
IPMITOOL_1_8_14RC1
ipmitool
IPMITOOL_1_8_13
IPMITOOL_1_8_13RC1
IPMITOOL_1_8_12
IPMITOOL_1_8_9
IPMITOOL_1_8_8
IPMITOOL_1_8_7
IPMITOOL_1_8_6
IPMITOOL_1_8_5
IPMITOOL_1_8_0
IPMITOOL_S10_U1
IPMITOOL_1_6_1
IPMITOOL_1_6_0
IPMITOOL_1_5_9
IPMITOOL_1_5_8
IPMITOOL_1_5_7
IPMITOOL_1_5_6
IPMITOOL_1_5_4
IPMITOOL_1_4_1_1
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
IPMITool/ipmitool#18
Reference in a new issue
IPMITool/ipmitool
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?