influxdb-java
influxdb-java copied to clipboard
Point should have accessor for time
Point carries information about time instant, but offers no way to access it (which is sometimes needed). Otherwise, we need to wrap Points with time information, thus, duplicating it.
Proposed method signature:
public Instant utcTime() {
// return based upon time value and precision
}
Wouldn't the signature more likely be
public Long getTime() {
return time; //return of long provided to most recent call to setTime or null
}
or
public Optional<Long> getTime() {
//same return as above inside Optional except Optional.empty() instead of null
}
It isn't influxDb's job to assign meaning to time or time zone.
Perhaps what is needed is to compare to two Point times within precision with a compare method.
@tomprodehl Yes, of course :D