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.
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 @tony.zhu
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.
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.