Skip to content
Commit 09a89821 authored by Manojkiran Eda's avatar Manojkiran Eda Committed by ManojKiran Eda
Browse files

common: modernize getCurrentSystemTime() API



Leverage `std::format` from c++20, which provides a more concise and
readable way to format strings compared to `std::stringstream`. Also use
zoned time from c++20 chrono, which makes the API to handle different
time zones if needed & is more accurate.

Tested :
Before the fix the API returns: 2024-04-24 UTC 05:19:00.533100
With this patch the API returns: 2024-04-24 UTC 05:19:00.533266342

Change-Id: Ida3ae3bdd8901422303a1812a30346d19f6bb5cb
Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
parent 93f1e00f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment