# Use client time zone for CMS

**URL:** <https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [April 6, 2020, 4:11pm UTC](https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858 "2020-04-06T16:11:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mykyta](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Mykyta](https://community.bloomreach.com/u/Mykyta)\
**Post date:** [April 6, 2020, 4:11pm UTC](https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858/1 "2020-04-06T16:11:24Z")

</div>

Hello guys,

I faced with the issue that `org.hippoecm.frontend.plugins.reviewedactions.dialogs.DatePickerComponent` (Schedule Publish\Unpublish) shows incorrect current time (it shows cuurent server time).  
After some investigation, I noticed that `UserSession.get().getClientInfo().getProperties().getTimeZone()` is not set. To set client time zone I can use:

- login page (as described [in this article] by setting  
time zone ([Customize the Login Page](https://documentation.bloomreach.com/14/library/concepts/login/customizing-the-login-page.html)))
- standart [Wicket approach](https://bhaskarvk.github.io/2008/05/wickets-date--time-components-and-client-server-timezones/), by setting getRequestCycleSettings().setGatherExtendedBrowserInfo(true).

1st approach is not working for me as I am using SSO integration and dont have default login page.  
2nd approach seems not working with Bloomreach Expirience (I have an error screen in login page).

I think that I can retrieve time zone thru the JavaScript but where is a proper place to integrate it?

Is there something that I can do to set correct time zone based on client location?

Thanks, Mykyta

---

<div class="post-metadata">

**Author:** ![Vasyl\_Khrystiuk](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/vasyl_khrystiuk/32/1545_2.png) [@Vasyl\_Khrystiuk](https://community.bloomreach.com/u/Vasyl_Khrystiuk)\
**Post date:** [April 4, 2023, 4:41pm UTC](https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858/2 "2023-04-04T16:41:13Z")

</div>

Any solution for that?

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 5, 2023, 8:47am UTC](https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858/3 "2023-04-05T08:47:15Z")

</div>

You could try setting:  
`UserSession.get().getClientInfo().getProperties().setTimeZone(timeZone);`

If you’re using SSO you likely have some filter that acts when the authentication is happening. That would probably be the place. I don’t know that this will work, but it is something to try.

---

<div class="post-metadata">

**Author:** ![Mykyta](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Mykyta](https://community.bloomreach.com/u/Mykyta)\
**Post date:** [April 5, 2023, 9:08am UTC](https://community.bloomreach.com/t/use-client-time-zone-for-cms/1858/4 "2023-04-05T09:08:52Z")

</div>

If I am not misteken, it was fixed by overriding `org.hippoecm.frontend.plugins.cms.root.RootPlugin`. and adding behavior. Behavior that collects the information to populate WebClientInfo’s ClientProperties by using Ajax.

![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/e/e7fbfdcf35deda89dcd008058dbaa5ff61718d1f.png)
