For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
629 2 4 7

Why does changing Time Zone with get_timeseries() change the number of returned outputs

If you run the code below: if you use time zone = est it retrieves 217 values, but when you change time zone to gmt it only returns 1 value ... Why? Is there a more efficient way to toggle between EST and GMT retrieval?

 
               

from dateutil.tz import tzlocal

from datetime import datetime

import datetime as dt

from datetime import tzinfo

import pytz


est = pytz.timezone('US/Eastern')

gmt = pytz.timezone('GMT')

utc = pytz.timezone('UTC')


ek.get_timeseries(["GBP5YMACL1=TWEB"],["CLOSE"],

start_date=dt.datetime(2020, 2, 12, 2, 30, 0, 0, tzinfo=est),

end_date=dt.datetime(2020, 2, 12, 7, 10, 0, 0, tzinfo=est),

interval="minute")



eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
tz.png (49.9 KiB)
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.

1 Answer

Upvotes
Accepted
18k 21 12 20

Hi @James.Perkins

These 2 queries request the data from a different time period.

1. 02:30AM GMT to 07:10AM GMT


2. 02:30AM EST to 07:10AM EST (which means 07:30AM GMT to 12:10PM GMT)


The data always return in GMT.


ahs1.png (64.3 KiB)
ahs2.png (120.3 KiB)
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