forked from Qortal/qortal
HSQLDBRepository.toOffsetDateTime now returns null if passed null
This commit is contained in:
parent
58afb53be9
commit
23bcba1650
@ -508,7 +508,10 @@ public class HSQLDBRepository implements Repository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Converts milliseconds from epoch to OffsetDateTime needed for TIMESTAMP WITH TIME ZONE columns. */
|
/** Converts milliseconds from epoch to OffsetDateTime needed for TIMESTAMP WITH TIME ZONE columns. */
|
||||||
/* package */ static OffsetDateTime toOffsetDateTime(long timestamp) {
|
/* package */ static OffsetDateTime toOffsetDateTime(Long timestamp) {
|
||||||
|
if (timestamp == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneOffset.UTC);
|
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneOffset.UTC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user