From: Vladimir Petko Date: Thu, 17 Jul 2025 14:12:28 +0000 (+0200) Subject: use int instead of time_t to print timezone info X-Git-Tag: archive/raspbian/21.0.8+9-1+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a2838ec4de9e4d1cb89384ad0e46c133d38c0a20;p=openjdk-21.git use int instead of time_t to print timezone info Bug: https://bugs.openjdk.org/browse/JDK-8334502 Last-Update: 2024-06-19 printf() call uses %02d format specifier that requires an int parameter. Gbp-Pq: Name jdk-8334502-proposed.patch --- diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index c8724cd06..fdcb99f48 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -198,8 +198,8 @@ char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t b abs_local_to_UTC = -(abs_local_to_UTC); } // Convert time zone offset seconds to hours and minutes. - const time_t zone_hours = (abs_local_to_UTC / seconds_per_hour); - const time_t zone_min = + const int zone_hours = (abs_local_to_UTC / seconds_per_hour); + const int zone_min = ((abs_local_to_UTC % seconds_per_hour) / seconds_per_minute); // Print an ISO 8601 date and time stamp into the buffer