Jump to content
Sign in to follow this  
Guest mrdavidlaing

What is the intention for the DateTimeOffset fields in the ApiMarketInformationDTO?

Recommended Posts

Guest mrdavidlaing

The latest version of the ApiMarketInformationDTO contains a collection of properties of type DateTimeOffset? –https://ciapipreprod.cityindextest9.co.uk/ciapi.docs/#type.ApiMarketInformationDTO – eg: TradingStartTimeUTC

All the other datetimes in the DTOs use the simpler offset free DateTime, and the convention that all times are expressed as UTC –https://ciapipreprod.cityindextest9.co.uk/ciapi.docs/#content.standards

What is the intention behind the use of the DateTimeOffset, and how should it be used in languages that don’t have a DateTimeOffset type?

Share this post


Link to post

The purpose of the DateTimeOffset fields is to enable the local time to be retrieved in addition to the time in UTC.

However, it has since been discovered that the .NET object DateTimeOffset doesn’t translate well to JSON so this is producing the wrong local time.

A new solution is being devised at the time of writing, but has not yet been finalised. It is therefore quite likely that these DateTimeOffset fields will be changed or removed in the near future.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×