Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JGitで、コミットのタイムゾーンを取得するにはどうすればよいですか?現在のRevCommitクラスには、タイムゾーンに関する情報はありません。UTCUNIX時間のみを返します
PersonIdentを使用します。
RevCommit commit = ...; PersonIdent committerIdent = commit.getCommitterIdent(); if (committerIdent != null) { TimeZone timeZone = committerIdent.getTimeZone(); // or getTimeZoneOffset() }
getAuthorIdent()作者も同じです。
getAuthorIdent()