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

imageIf 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")



Best Answer

  • Hi @James.Perkins

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

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

    image


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

    image


    The data always return in GMT.