How to setup a timezone on DXP
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- We have to make a setup in EST timezone and we would like to know how can we do that on the DXP.
Resolution
-
Liferay runs and stores all times in UTC format to facilitate translating times into appropriate timezone for the user.
- The instance itself has locale settings which defaults to UTC. You just need to change the setting to EST, under Control Panel > Instance Settings > Localization > Time Zone.
- You don't need to change timezone of database. Liferay always stores times in UTC in the database.
- You can set the timezone on the server to anyone. Timezone of the JVM, in the
setenv.sh/setenv.bat scripts or however you start tomcat (or any other app server you’re using), the -Duser.timezone=GMT is required.
- Within the Liferay instance, you are free to set the default timezone to anything you want. But the JVM must be in GMT, the times are persisted as GMT in the database and in the index too.
Did this article resolve your issue ?