Make ZipEntryTest time-insensitive

Fix ZipEntryTest to not depend on the current system time.

The ZIP format represents timestamps outside of DOS time
(before 1980) via an extra field.

ZipEntryTest.testCommentAndExtraInSameOrder() asserts that
the extra field can be read back unchanged, but since it
defaulted to the current system time, this check failed
when the system time was before 1980.

This CL fixes the test by explicitly setting a timestamp
in 2010 on the new entry. It also adds new tests for the
behavior difference before/after 1980.

Bug: 37696493
Test: cts-tradefed run cts -m CtsLibcoreTestCases -t \
Test: cts-tradefed run cts -m CtsLibcoreTestCases -t \
Change-Id: I8024c9dcb23179a69e1805e66c6b051f1a358800
2 files changed