
redblue
-Interested User-
Posts: 51
Joined: Oct 29, 2009
|
Posted: Nov 4, 2015 08:11 AM

Msg. 1 of 6
Hi,
I'll admit I am very confused, so please excuse the silly questions, but I need to start with the basics...:)
I need to convert all historical and streaming data into UTC.
I understand that all historical data is in EST. To convert this time to UTC, I just need to add 5 hours. However, is this *always* correct with daylight savings? In other words, if I request a months worth (from now) of historical data (say hour bars), do I just add 5 hours to the date time for *all* bars, even though this requests spans a switch from summer time?
Likewise, is the live streaming always in EST, so I'd just need to add 5 hours or does it change to EDT for daylight saving?
Regards,
|

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Nov 4, 2015 08:37 AM

Msg. 2 of 6
Good morning, For historical data, everything is saved to our history with the time it occurred in EST as is appropriate. There are methods available that handle this conversion automatically for you with considerations for DST already included. Here is one that I found, I am sure there are Java options out there as well. https://msdn.microsoft.com/en-us/library/system.datetime.touniversaltime(v=vs.110).aspxI would not delve into all of the craziness of dates and times and the exceptions that may apply if you don't have to. Tim
|

redblue
-Interested User-
Posts: 51
Joined: Oct 29, 2009
|
Posted: Nov 4, 2015 08:58 AM

Msg. 3 of 6
Thanks Tim for quick reply.
Ok. So what does "EST as is appropriate" actually mean? For example:
We're now in EST until 13 Mar 2016, 02:00. What happens after that time? Do you adjust the new bars to 'become' EST as the new data generated wont be in EST but EDT? In other words, is the datetime always the same time away from UTC?
Or, are you saying that the data is actually in EST and when daylight savings is in effect, the data is in EDT. So this would mean for each year, is half the dataset in UTC-5 and the other half UTC-4?
(the reason why this is important is that we're looking at instruments that trade 24 hours a day and we're seeing differences in the historical dataset coming from IQfeed and the broker).
|

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Nov 4, 2015 09:22 AM

Msg. 4 of 6
The data is in EST except for when daylight savings is in effect, then the data is in EDT. So yes, half the year is in UTC-5 and the other half UTC-4?
The method I mentioned takes this into account and handles the instances where the effective date of DST has changed over history.
|

redblue
-Interested User-
Posts: 51
Joined: Oct 29, 2009
|
Posted: Nov 5, 2015 03:18 AM

Msg. 5 of 6
Thanks Tim.
I assume the same happens with the live feed (EST/EDT)?
Regards,
|

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Nov 5, 2015 07:48 AM

Msg. 6 of 6
That would be correct.
Tim
|