Fokko commented on PR #2554:
URL: https://github.com/apache/avro/pull/2554#issuecomment-1775156498

   This is a bit ambiguous indeed, you need to supply an [`Instant` for the 
`timestamp`](https://github.com/apache/avro/blob/main/lang/java/avro/src/main/java/org/apache/avro/data/TimeConversions.java#L160-L205)
 and a [`LocalDateTime` for the 
`local-timestamp`](https://github.com/apache/avro/blob/main/lang/java/avro/src/main/java/org/apache/avro/data/TimeConversions.java#L238-L267).
 So in your application code, you need to make sure that you use the right 
objects. Having only `timestamp` would impose the responsibility of converting 
the `LocalDateTime` to an `Instant` on the developer. Having this distinction 
makes sure that a developer is less likely to store a `Instant` into a 
`local-timestamp`, without seeing anything off.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to