]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Don't do direct comparison of timestamps that
authorTim Kientzle <kientzle@gmail.com>
Tue, 24 Jan 2012 05:18:00 +0000 (00:18 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 9 Feb 2012 00:44:25 +0000 (09:44 +0900)
are in local time.

SVN-Revision: 4198

libarchive/test/test_compat_zip.c

index 5b828bf9f2e5b5a574eef22852befdb9f64b65c0..e389c59ddbf597fd769d3462ecf6db5e52aa0795 100644 (file)
@@ -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));
 }