List of usage examples for org.eclipse.jgit.util GitDateParser parse
public static Date parse(String dateStr, Calendar now, Locale locale) throws ParseException
From source file:com.google.gerrit.server.notedb.CommentsInNotesUtil.java
License:Apache License
private static Timestamp parseTimestamp(byte[] note, MutableInteger curr, Change.Id changeId, Charset enc) throws ConfigInvalidException { int endOfLine = RawParseUtils.nextLF(note, curr.value); Timestamp commentTime;/*from w w w . j a v a 2s . co m*/ String dateString = RawParseUtils.decode(enc, note, curr.value, endOfLine - 1); try { commentTime = new Timestamp(GitDateParser.parse(dateString, null, Locale.US).getTime()); } catch (ParseException e) { throw new ConfigInvalidException("could not parse comment timestamp", e); } curr.value = endOfLine; return checkResult(commentTime, "comment timestamp", changeId); }