class DefaultLongPollingManager implements LongPollingManager {

	@Override
	public ZonedDateTime getLastTimeStamp(AbstractDto dto) {
		ZonedDateTime lastModified = dto.getModified();
		if (lastModified == null) {
			lastModified = dto.getCreated();
		}

		if (lastModified == null) {
			return null;
		}

		if (dto.getCreated() != null && lastModified.isBefore(dto.getCreated())) {
			lastModified = dto.getCreated();
		}

		return lastModified.plus(1, ChronoUnit.MILLIS);
	}

}