RevCommit
has a getCommitTime()
method but it returns an int
and it does not have an author time. How can I get the author and commit date from a RevCommit
?
Asked
Active
Viewed 6,801 times
1 Answers
29
Like so:
RevCommit commit = ...;
PersonIdent authorIdent = commit.getAuthorIdent();
Date authorDate = authorIdent.getWhen();
TimeZone authorTimeZone = authorIdent.getTimeZone();
PersonIdent committerIdent = commit.getCommitterIdent();
...
Also see API documentation.

robinst
- 30,027
- 10
- 102
- 108