Skip to content
Snippets Groups Projects
Commit 92b35db2 authored by Ivan Frade's avatar Ivan Frade Committed by Matthias Sohn
Browse files

PersonIdent: Use java.time instead of older Date and milliseconds

From errorprone: Date has a bad API that leads to bugs; prefer
java.time.Instant or LocalDate.

Replace the long with milliseconds and int with minutes offset with an
Instant and a ZoneOffset. Create new constructors and deprecate
variants with Date, milliseconds and minute offsets.

When comparing instances of PersonIdent truncate the timestamp precision
to 1 second since git commit timestamps are persisted with 1 second
precision [1].

[1] https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-Gitinternalformat

Change-Id: Id4ba1f108e1ba0bfcdd87ba37c67e2d3cc7d254f
parent 307ef6b4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment