From: Tim Kientzle Date: Tue, 24 Jan 2012 05:18:00 +0000 (-0500) Subject: Don't do direct comparison of timestamps that X-Git-Tag: v3.0.4~2^2~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef42ef7f4ea9e44c52db3239716f8a3672de3e1;p=thirdparty%2Flibarchive.git Don't do direct comparison of timestamps that are in local time. SVN-Revision: 4198 --- diff --git a/libarchive/test/test_compat_zip.c b/libarchive/test/test_compat_zip.c index 8f457e699..4c3017cc3 100644 --- a/libarchive/test/test_compat_zip.c +++ b/libarchive/test/test_compat_zip.c @@ -359,12 +359,16 @@ compat_zip_6_verify(struct archive *a) assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); assertEqualString("New Folder/New Folder/", archive_entry_pathname(ae)); assertEqualInt(AE_IFDIR, archive_entry_filetype(ae)); - assertEqualInt(1327314468, archive_entry_mtime(ae)); + /* Zip timestamps are local time, so vary by time zone. */ + /* TODO: A more complex assert would work here; we could + verify that it's within +/- 24 hours of a particular value. */ + /* assertEqualInt(1327314468, archive_entry_mtime(ae)); */ assertEqualInt(0, archive_entry_size(ae)); assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); assertEqualString("New Folder/New Folder/New Text Document.txt", archive_entry_pathname(ae)); assertEqualInt(AE_IFREG, archive_entry_filetype(ae)); - assertEqualInt(1327314476, archive_entry_mtime(ae)); + /* Zip timestamps are local time, so vary by time zone. */ + /* assertEqualInt(1327314476, archive_entry_mtime(ae)); */ assertEqualInt(11, archive_entry_size(ae)); assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); }