dbus-sdr: sel: Fix dst setting
Use the day time saving information on the system to calculate the time
instead of zero (no dst) as the default.
https://linux.die.net/man/3/mktime
Failure Example,
```
$ stat /var/log/ipmi_sel
File: /var/log/ipmi_sel
Size: 88 Blocks: 8 IO Block: 4096 regular file
Device: 1bh/27d Inode: 4125 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-09-25 14:37:03.631424968 -0700
Modify: 2023-09-25 14:37:02.291422780 -0700
Change: 2023-09-25 14:37:02.291422780 -0700
$ ipmitool sel
SEL Information
Version : 1.5 (v1.5, v2 compliant)
Entries : 0
Free Space : 65535 bytes or more
Percent Used : unknown
Last Add Time : 09/25/23 14:30:08 PDT
Last Del Time : Not Available
Overflow : false
Supported Cmds : 'Reserve'
$ ipmitool sel list
1 | 09/25/23 | 15:30:07 PDT | reserved #0xff | | Asserted
```
Tested:
Fixed the timezone issues
```
$ ipmitool sel list
1 | 09/25/23 | 14:30:07 PDT | reserved #0xff | | Asserted
```
Change-Id: I23bdb5039bed8e135f06d399a5e970bbc1e5ed58
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index 3174200..7439fd3 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -1010,6 +1010,7 @@
uint32_t timestamp = ipmi::sel::invalidTimeStamp;
if (entryStream >> std::get_time(&timeStruct, "%Y-%m-%dT%H:%M:%S"))
{
+ timeStruct.tm_isdst = -1;
timestamp = std::mktime(&timeStruct);
}