Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 5 9

How to return local exchange time in time series?

I use the following code to get data:

df1=ek.get_timeseries('2330.TW',fields=["Open","High","Low","Close","Volume"], start_date = "2018-08-02T01:00:00" ,end_date='2018-10-27T23:00:00',interval='minute')

but it does not return the local time format , it should be Taiwan timezone, how to fix it ,

Thanks

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apitime-zone
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.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks, AHS

@andy.ej

Hello again!

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

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@andy.ej

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
111 2 5 8

Hi,

Please try to convert the return dataframe to your desired timezone.

import pytz

eastern = pytz.timezone('Asia/Shanghai')

df.index = df.index.tz_localize(pytz.utc).tz_convert(eastern)

Thanks.

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.

thanks , it is very helpful.

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.