Skip to content

Commit

Permalink
test: fix expected time to work in any timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Dec 22, 2023
1 parent 8ec86e9 commit 4e3b24a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ void can_extract(TestData testData) throws Exception {
List<TestData> getTestData() throws URISyntaxException {
return List.of(
new TestData(getResourcePath("/rar5/rar5.rar"), getResourcePath("/rar5/rar5/"), asList(
new ArchiveEntry("FILE1.TXT", 7L, ZonedDateTime.of(2010, 11, 3, 7, 27, 28, 0, ZoneId.systemDefault()).toInstant()),
new ArchiveEntry("FILE2.TXT", 7L, ZonedDateTime.of(2010, 11, 3, 7, 27, 34, 0, ZoneId.systemDefault()).toInstant())
new ArchiveEntry("FILE1.TXT", 7L, ZonedDateTime.of(2010, 11, 2, 23, 27, 28, 0, ZoneId.of("UTC")).toInstant()),
new ArchiveEntry("FILE2.TXT", 7L, ZonedDateTime.of(2010, 11, 2, 23, 27, 34, 0, ZoneId.of("UTC")).toInstant())
)),
new TestData(getResourcePath("/rar5/unicode.rar"), getResourcePath("/rar5/unicode/"), asList(
new ArchiveEntry("ウニコド.txt", 67L, ZonedDateTime.of(2020, 7, 28, 9, 49, 34, 0, ZoneId.systemDefault()).toInstant()),
new ArchiveEntry("新建文本文档.txt", 10L, ZonedDateTime.of(2020, 7, 28, 9, 50, 48, 0, ZoneId.systemDefault()).toInstant())
new ArchiveEntry("ウニコド.txt", 67L, ZonedDateTime.of(2020, 7, 28, 1, 49, 34, 0, ZoneId.of("UTC")).toInstant()),
new ArchiveEntry("新建文本文档.txt", 10L, ZonedDateTime.of(2020, 7, 28, 1, 50, 48, 0, ZoneId.of("UTC")).toInstant())
))
);
}
Expand Down

0 comments on commit 4e3b24a

Please sign in to comment.