How to return result of "TR.F.OriginalAnnouncementDate" in local timezone.

The return for "TR.F.OriginalAnnouncementDate" shows in UTC timezone. eg.

2025-05-08T04:55:00Z

Is it possible to return in Japan logal time (GMT+8) ?

<script>

import lseg.data as ld
ld.open_session()
df = ld.get_data(universe = ['7203.T'], fields = ['TR.F.OriginalAnnouncementDate(Period=FY0,Frq=FY,SDate=1D)'])

display(df)

<result>

Instrument

Original Announcement Date Time

0

7203.T

2025-05-08T04:55:00Z

Best Answers

  • wasin.w V3
    wasin.w V3 admin
    Answer ✓

    Hello @Midori517

    The library always returns time data in GMT0 (UTC) by default. The library does support a feature to change the return data time zone.

    The client can use Python code to change time zone in the dataframe.

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Midori517

    Thank you for reaching out to us.

    I checked the Data Item Browser tool but couldn't find any parameters in TR.F.OriginalAnnouncementDate that allow timezone conversion.

    However, this could be done via the Python code. For example:

    import pandas as pd
    df = ld.get_data(universe = ['7203.T'], fields = ['TR.F.OriginalAnnouncementDate(Period=FY0,Frq=FY,SDate=1D)'])
    df['datetime_utc'] = pd.to_datetime(df['Original Announcement Date Time'])
    df['datetime_jst'] = df['datetime_utc'].dt.tz_convert('Asia/Tokyo')
    df
    
    image.png