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:
Manojkiran Eda <manojkiran.eda@gmail.com>
Loading
Please register or sign in to comment