From 065366dd278d5a2e220c9aa2667296580d414cab Mon Sep 17 00:00:00 2001 From: Evan Benn Date: Mon, 7 Nov 2022 15:30:20 +1100 Subject: flashrom_tester: Change timestamp to UTC microsecond Match the timestamp with dmesg and other logs for ease of comparing. BUG=b:246250254 BRANCH=None TEST=flashrom_tester --libflashrom host Change-Id: I05182f52c0e9392a4fa2b388fdc30633e5d6e5ef Signed-off-by: Evan Benn Reviewed-on: https://review.coreboot.org/c/flashrom/+/69269 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- util/flashrom_tester/src/logger.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/flashrom_tester/src/logger.rs') diff --git a/util/flashrom_tester/src/logger.rs b/util/flashrom_tester/src/logger.rs index 12e54957..3c9b74b4 100644 --- a/util/flashrom_tester/src/logger.rs +++ b/util/flashrom_tester/src/logger.rs @@ -58,8 +58,8 @@ impl log::Log for Logger { fn log(&self, record: &log::Record) { fn log_internal(mut w: W, record: &log::Record) -> std::io::Result<()> { - let now = chrono::Local::now(); - write!(w, "{}{} ", types::MAGENTA, now.format("%Y-%m-%dT%H:%M:%S"))?; + let now = chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Micros, true); + write!(w, "{}{} ", types::MAGENTA, now)?; write!( w, "{}[ {} ]{} ", -- cgit v1.2.3