Forum Discussion

ryancjmp's avatar
2 years ago

Get User's Configured Timezone from API

I'm trying to display an article's last_edit_time in the user's configured timezone.  How can I get the user's configured timezone from the api?  I can't seem to find it in the documentation.

  • The best way to get it is actually with just freemarker...

    settings.name.get("config.timezone")

    And if you inspect the user setting (e.g. inhttps://community.khoros.com/t5/user/myprofilepage/tab/user-preferences ) You can see the the possible values (e.g. "US/Pacific"). 

    However, if you're fetching from API v2 as the current logged in user, it should already be returned in the users current timezone.

  • MattV's avatar
    MattV
    Khoros Staff

    The best way to get it is actually with just freemarker...

    settings.name.get("config.timezone")

    And if you inspect the user setting (e.g. inhttps://community.khoros.com/t5/user/myprofilepage/tab/user-preferences ) You can see the the possible values (e.g. "US/Pacific"). 

    However, if you're fetching from API v2 as the current logged in user, it should already be returned in the users current timezone.