Following a EMA demo session with clients, they want to know if there is any method available to convert com.thomsonreuters.ema.access.DataType.DataTypes#DATETIME to java.time.LocalDateTime, and vice verse. Can anyone help with it? Thanks.
Hello @tonyzhuTR
According to my finding, EMA does not provide any method to convert com.thomsonreuters.ema.access.DataType.DataTypes#DATETIME to java.time.LocalDateTime, and vice verse. The application has to do this by itself.
Converting to java.time.Instant would be more appropriate. This is because the content of a DATETIME field is meant to a UTC value. Converting to LocalDateTime would be incorrect, IMO.
java.time.Instant
LocalDateTime
Of course, it cannot be guaranteed that there wouldn't be someone out there who hasn't read the documentation and therefore would be publishing some local timezone value into a DATETIME field. However, I still think that - in the absence of other information - you should trust that publishers of information are in fact obeying by the convention.