diff options
author | Ivan Frade <ifrade@google.com> | 2024-12-27 17:02:36 -0800 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-12-27 17:02:36 -0800 |
commit | a45b3cce4517a9c95d8039826a04e51e6276c3d7 (patch) | |
tree | 7ee45658762651df98e1f41e208793ab205bce90 /org.eclipse.jgit.junit/src/org/eclipse | |
parent | 8497c89192b80fd333b6227a7e222fbd4d1697e7 (diff) | |
download | jgit-a45b3cce4517a9c95d8039826a04e51e6276c3d7.tar.gz jgit-a45b3cce4517a9c95d8039826a04e51e6276c3d7.zip |
TestRepository: Stop using deprecated methods in SystemReader
Change-Id: I1d1f174f739137c24fb586cb2f6d054d4785d716
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java | 4 |
1 files 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<R extends Repository> 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); } |