Long timestamp = timestamps.get(i); insertAndAdd(f); final RevCommit commit = geogig.command(CommitOp.class).setCommitterTimestamp(timestamp) .call(); allCommits.addFirst(commit);
Long timestamp = timestamps.get(i); insertAndAdd(f); final RevCommit commit = geogig.command(CommitOp.class).setCommitterTimestamp(timestamp) .call(); allCommits.addFirst(commit);
command.setCommitter(userName, null); command.setCommitterTimestamp(changeset.getClosed().get()); command.setCommitterTimeZoneOffset(0);// osm timestamps are in GMT
Long millis = geogig.command(ParseTimestamp.class).setString(commitTimestamp) .call(); commitOp.setCommitterTimestamp(millis.longValue());
Long millis = geogig.command(ParseTimestamp.class).setString(commitTimestamp) .call(); commitOp.setCommitterTimestamp(millis.longValue());
Long millis = geogig.command(ParseTimestamp.class).setString(commitTimestamp) .call(); commitOp.setCommitterTimestamp(millis.longValue());
@Test public void testExplicitTimeStamp() throws Exception { CommitOp commitCommand = geogig.command(CommitOp.class); commitCommand.setAuthorTimestamp(1000L); commitCommand.setAuthorTimeZoneOffset(-3); commitCommand.setCommitterTimestamp(2000L); commitCommand.setCommitterTimeZoneOffset(+4); commitCommand.setAllowEmpty(true); RevCommit commit = commitCommand.call(); assertEquals(1000L, commit.getAuthor().getTimestamp()); assertEquals(-3, commit.getAuthor().getTimeZoneOffset()); assertEquals(2000L, commit.getCommitter().getTimestamp()); assertEquals(+4, commit.getCommitter().getTimeZoneOffset()); }
@Test public void testExplicitTimeStamp() throws Exception { CommitOp commitCommand = geogig.command(CommitOp.class); commitCommand.setAuthorTimestamp(1000L); commitCommand.setAuthorTimeZoneOffset(-3); commitCommand.setCommitterTimestamp(2000L); commitCommand.setCommitterTimeZoneOffset(+4); commitCommand.setAllowEmpty(true); RevCommit commit = commitCommand.call(); assertEquals(1000L, commit.getAuthor().getTimestamp()); assertEquals(-3, commit.getAuthor().getTimeZoneOffset()); assertEquals(2000L, commit.getCommitter().getTimestamp()); assertEquals(+4, commit.getCommitter().getTimeZoneOffset()); }
.setCommitterTimestamp(newTimestamp).call();
.setCommitterTimestamp(newTimestamp).call();