List Archive

Thread

Thread Index

Message

From: Andreas Falkenhahn <andreas%falkenhahn.com@localhost>
To: libzip mailing list <libzip-discuss%nih.at@localhost>
Subject: zip_file_set_mtime() bug?
Date: Wed, 15 Nov 2017 17:48:07 +0100

I want to set the datestamp of a file inside a zip archive to
16-Sep-2017 08:34:56. This is my code:

        struct tm tm;

        tm.tm_sec = 56;
        tm.tm_min = 34;
        tm.tm_hour = 8;
        tm.tm_mday = 16;
        tm.tm_mon = 8;
        tm.tm_year = 117;
        tm.tm_isdst = -1;
        
        zip_file_set_mtime(arc, 0, mktime(&tm), 0);
        
When I compile and run this code on Linux, Ubuntu shows the
file date correctly as 16-Sep-2017 08:34:56.

When I compile and run this code on Windows, however, Windows
Explorer shows the file date as 16-Sep-2017 09:34:56, i.e.
one hour later than what I passed to zip_file_set_mtime().

Is this a bug in libzip or am I doing something wrong here?

-- 
Best regards,
 Andreas Falkenhahn                          
mailto:andreas%falkenhahn.com@localhost

Made by MHonArc.