From a45b3cce4517a9c95d8039826a04e51e6276c3d7 Mon Sep 17 00:00:00 2001 From: Ivan Frade Date: Fri, 27 Dec 2024 17:02:36 -0800 Subject: TestRepository: Stop using deprecated methods in SystemReader Change-Id: I1d1f174f739137c24fb586cb2f6d054d4785d716 --- org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java index e53dbf1bfc..2d00a850e5 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java @@ -159,8 +159,8 @@ public class TestRepository implements AutoCloseable { this.pool = rw; this.inserter = db.newObjectInserter(); this.mockSystemReader = reader; - long now = mockSystemReader.getCurrentTime(); - int tz = mockSystemReader.getTimezone(now); + Instant now = mockSystemReader.now(); + ZoneId tz = mockSystemReader.getTimeZoneAt(now); defaultAuthor = new PersonIdent(AUTHOR, AUTHOR_EMAIL, now, tz); defaultCommitter = new PersonIdent(COMMITTER, COMMITTER_EMAIL, now, tz); } -- cgit v1.2.3