question

Upvotes
Accepted
13 2 1 2

EMA DataType Conversion

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.

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
9.5k 10 5 7

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
1.5k 3 5 7

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea