Don't decrease POST codes time precision
POST codes are produced in sequence one by one and it is important to
keep the order of the messages correct.
'phosphor-post-code-manager' provides POST codes with a time marker of
a usec precision. Currently this time is truncated to sec, and it makes
it impossible to restore original POST codes order for the boards that
produce more than one POST code in a second.
To correct this output POST codes with original usec precision.
Tested: Tested on the AMD EthanolX CRB. Sorting POST codes in the
webui-vue application by 'Created' field now works as expected.
Change-Id: Icc0aa279aa385018923e8df916c76a7064922f6c
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 89c38b0..a483a62 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -3697,8 +3697,7 @@
// Get the Created time from the timestamp
std::string entryTimeStr;
- entryTimeStr =
- redfish::time_utils::getDateTimeUint(usecSinceEpoch / 1000 / 1000);
+ entryTimeStr = redfish::time_utils::getDateTimeUintUs(usecSinceEpoch);
// assemble messageArgs: BootIndex, TimeOffset(100us), PostCode(hex)
std::ostringstream hexCode;