From 047b96e8b45790992ec0751dabe3601a0187bcd5 Mon Sep 17 00:00:00 2001 From: kunitoki Date: Wed, 13 May 2026 17:27:29 +0200 Subject: [PATCH] Fix zip file time --- modules/yup_core/zip/yup_ZipFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/yup_core/zip/yup_ZipFile.cpp b/modules/yup_core/zip/yup_ZipFile.cpp index c58e33822..dab1a862b 100644 --- a/modules/yup_core/zip/yup_ZipFile.cpp +++ b/modules/yup_core/zip/yup_ZipFile.cpp @@ -687,7 +687,7 @@ struct ZipFile::Builder::Item static void writeTimeAndDate (OutputStream& target, Time t) { - target.writeShort ((short) (t.getSeconds() + (t.getMinutes() << 5) + (t.getHours() << 11))); + target.writeShort ((short) ((t.getSeconds() >> 1) + (t.getMinutes() << 5) + (t.getHours() << 11))); target.writeShort ((short) (t.getDayOfMonth() + ((t.getMonth() + 1) << 5) + ((t.getYear() - 1980) << 9))); }