Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Conversation

@baroleg
Copy link

@baroleg baroleg commented Apr 24, 2018

Rest request

/v2/observations?constraint={"type":"concept","path":""}&type=clinical

return "startDate": "0000-12-30T00:00:00Z", but in db value is 0001-01-01 00:00:00 (Default value).
Convert as
def time = Instant.ofEpochMilli(((Date) value).time).toString()
is worked for normal date, but for very old date Instant is more strong and convert works wrong.

@gijskant gijskant requested a review from forus April 30, 2018 09:22
} else if (value instanceof String) {
writer.value((String) value)
} else if (value instanceof Timestamp) {
def time = ((Timestamp)value).toLocalDateTime().atZone(ZoneId.of("GMT")).toInstant().toString()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@baroleg Thanks for contributing. Would it be possible for you to write a simple regression test that reproduces the issue?
See transmart-core/transmart-rest-api/src/test/groovy/org/transmartproject/rest/serialization/ for test examples.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants