#
253bfb72 |
| 30-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: time: use gmtime for all operations
The test cases in `bcd_time_test.cpp` could fail if the executing host were not in UTC. By default the BMC uses UTC but the development systems a
openpower-pels: time: use gmtime for all operations
The test cases in `bcd_time_test.cpp` could fail if the executing host were not in UTC. By default the BMC uses UTC but the development systems are often in a user's local time zone. Switch all time operations to work off UTC by using gmtime/timegm instead of localtime/mktime.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6230fd014f44123fe917a8e2b39e3b903d3a05e8
show more ...
|
#
1aa90d49 |
| 13-Sep-2023 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
PEL: switch fmt::format to use std::format
fmt::format is supported in the c++ std. This will help to remove fmt package dependency.
Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503 Signed-
PEL: switch fmt::format to use std::format
fmt::format is supported in the c++ std. This will help to remove fmt package dependency.
Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
#
0bf04b5d |
| 28-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Convert a BCDTime to epoch milliseconds
Add a new function to convert a BCDTime value from a PEL to the number of milliseconds since the epoch.
This will be used to put the PEL creation timest
PEL: Convert a BCDTime to epoch milliseconds
Add a new function to convert a BCDTime value from a PEL to the number of milliseconds since the epoch.
This will be used to put the PEL creation timestamp on D-Bus.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ic470c9324e959b3e6a7eea29db4162a45dd54fc3
show more ...
|
#
d7b004bf |
| 06-Nov-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Const flatten for BCDTime
It doesn't modify the object, so can be const.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ib3bbe2b8467578b0cddce0284aa6ae95f1ad826a
|
#
711d51d8 |
| 06-Nov-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add license prologue to source files
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I31b12f509d32b79064a8a427af35e6a310273051
|
#
5fa87f08 |
| 27-Aug-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Get BCD time from epoch milliseconds
Add a new BCD time conversion function which will be used in a future commit to convert an OpenBMC event log timestamp into BCD time.
Signed-off-by: Matt S
PEL: Get BCD time from epoch milliseconds
Add a new BCD time conversion function which will be used in a future commit to convert an OpenBMC event log timestamp into BCD time.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I08f585d1663bf2d2f73d42b8716756d8c7e3559e
show more ...
|
#
df797f2b |
| 09-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add BCD time helpers for PELs
A PEL stores time in BCD, with a byte each for: * year MSB * year LSB * month * day * hour * minutes * seconds * hundredths
This commit adds a structure to repres
PEL: Add BCD time helpers for PELs
A PEL stores time in BCD, with a byte each for: * year MSB * year LSB * month * day * hour * minutes * seconds * hundredths
This commit adds a structure to represent this, and functions to: * Create a BCD structure from a std::chrono::time_point * Convert any number to BCD * Write the BCD structure into a Stream * Extract a BCD structure from a Stream
Refresher: The BCD value of 32 is 0x32.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I09ea4098f3a3981931f595d11fb63aff31d9fb0d
show more ...
|