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
3 3 5 5

How do I set the "CF_TIME" field in the EIKON API to the time zone I live in?

The first picture is the data I received from Excel using CF_LAST, CF_TIME, and CF_DATE. 
In the second picture, I received data of the same field using the EIKON API.
 
In the case of Excel, CF_TIME and CF_DATE are automatically set to the time zone of Korea where I live. 
However, for the EIKON API, CF_TIME and CF_DATE seem to follow the GMT time zone.
 
How do I set CF_TIME and CF_DATE in the EIKON API to the time zone of Korea where I live?
eikoneikon-data-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

1 Answer

· Write an Answer
Upvote
Accepted
39.4k 77 11 27

Eikon Data APIs return all timestamps in UTC. You can use pandas capabilities to convert timestamp to the timezone of your choice. The following example adds a column to your dataframe containing pandas Timestamp objects created using date and time strings in columns CF_DATE and CF_TIME, adds timezone info to these objects and converts the timezone to Seoul.

df['Timestamp'] = pd.to_datetime(df['CF_DATE']+'T'+df['CF_TIME']) \
                    .dt.tz_localize('UTC').dt.tz_convert('Asia/Seoul')
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 very much. Have a nice day.

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.