From 03025dee585c0842412a55ef20d7504ae4eba75d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 11 May 2026 18:21:42 +0100 Subject: [PATCH] main: Drop the "Z" suffix from wallclock time in the log This prints the time in the local time. The "Z" suffix usually indicates UTC time. This is left over from when there was manual implementation using libc::gmtime() Signed-off-by: Rob Bradford --- cloud-hypervisor/src/logger.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cloud-hypervisor/src/logger.rs b/cloud-hypervisor/src/logger.rs index 800a3711d..184c18847 100644 --- a/cloud-hypervisor/src/logger.rs +++ b/cloud-hypervisor/src/logger.rs @@ -137,7 +137,7 @@ impl log::Log for Logger { Token::WallClock => write!( out, "{}", - jiff::Zoned::now().strftime("%Y-%m-%dT%H:%M:%S%.6fZ") + jiff::Zoned::now().strftime("%Y-%m-%dT%H:%M:%S%.6f") ), Token::Pid => write!(&mut *out, "{}", self.pid), // SAFETY: gettid(2) always succeeds @@ -368,8 +368,7 @@ mod tests { let out = buf.contents(); let out = out.trim(); - assert_eq!(out.len(), 27, "got: {out}"); - assert!(out.ends_with('Z'), "got: {out}"); + assert_eq!(out.len(), 26, "got: {out}"); assert_eq!(&out[4..5], "-", "got: {out}"); assert_eq!(&out[7..8], "-", "got: {out}"); assert_eq!(&out[10..11], "T", "got: {out}");