question

Upvotes
Accepted
3 0 0 2

REDI CacheControl: "Date" field

I'm developing a C# app to work with the REDI API. It uses the CacheControl object to subscribe to CacheEvents, and I've used your example as a starting point:

https://github.com/Refinitiv-API-Samples/Example.REDI.CSharp.Examples/tree/master/REDIConsoleOrders

One of the data fields in each CacheEvent is called "Date". My questions are:

  1. What is the meaning of this "Date" field?
  2. The value of the "Date" field includes both date and time information, but no time zone. So I need the time zone to use it correctly. Is it represented in UTC, America/New_York, the timezone of the machine running the REDIPlus app, or some other time zone?
  3. Can I expect the CacheEvents received during a session to all be the same? For example, if I start my REDIPlus app on Sunday at 21:05 New York time and let it run until it's forced to log off by the system at 20:00 Monday, will the value of "Date" be the same for all CacheEvents received during that time period?

Thanks in advance for your help.

Patrick

redi-apicaching
icon clock
10 |1500

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

It's been a week since I asked this question, with no reply. Is someone available to answer, please?

Following up with REDI team

Hello @patrick.noble,

Apologies for the long response.

We have escalated your questions.

Thanks for your patience,

-AHS

Hello @patrick.noble,

Can you please include the relevant segment of your code where you use Date, so we can better understand the question?

Do you mean:

Time = GetCell(orderCache, row, "Time", out errCode).ToString().TrimStart();

or?

Thanks

Hi Zoya, thanks for getting back to me.

The "Date" field is one of several fields returned by the CacheEvent object. The list of fields we are parsing follows. (The raw REDI field name is on the left, you can ignore the string on the right of each row):

Show more comments

And here is an extract of our code:

Fields = new Dictionary<string, OrderElement>();            foreach ((string, string) s in OrderFields.FieldNames)
  OrderElement oe = new OrderElement(s);                      oe.Value = StreamREDIMessages.GetCell(cc, row, s.Item1, out int errCode).ToString().TrimStart();                      Fields.Add(oe.REDIFieldName, oe);


cc is a reference to the CacheControl object





Hello @patrick.noble

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Show more comments
Upvotes
Accepted
276 3 0 2

Hi @patrick.noble,


1) The "Date" field shows both the date and a time value, but the time value should be ignored. (i.e. take only the date from "Date").

2) The time zone used is the local machine time.

3) You should expect the date values to change as the actual dates change. (e.g. if an execution is received on 6/2, the Date will be 6/2, even if the initial snapshot occurred on 5/31)


Thanks,

Brian

icon clock
10 |1500

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

Upvotes
3 0 0 2

One more question... At what time does the "Date" value change to the next day?

Thanks,
Patrick

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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