The exchange rate quotes sent by Reuters have separate date fields for askdate and biddate;
When using the toDate() method of the RFA api to convert these two times to Beijing time, no 1 is added in the case of inter-day.
For example, if a "EUR=" rate quote is sent on 2023-03-21 23:00:00 GMT.
The value of the askdate field is 2023-03-21, which should be 2023-03-22 when converted to BST.
But the current date after conversion is still 2023-03-21
The conversion code is shown below:
- OMMData data = entry.getData(def.getOMMType());
- OMMDateTime dt = (OMMDateTime)data;
- // Since the date field does not carry a time, the default is 00:00:00
- // So when the time sent by Reuters is converted to Beijing time,
- // the date will never cross the day
- Date date = dt.toDate();