When deploying a project, you may need to use multiple different servers to deploy multiple project nodes, cluster components, external configuration databases, and others.
You must ensure that the time zones of these servers are consistent. Otherwise, issues such as deployment failures, startup failures, and data extraction exceptions may occur.
Issue one: The data source of a user’s read/write task is a MySQL database, but the date data displayed on the Data Preview page of FineDataLink is inconsistent with the date data stored in the database.
Issue two: A scheduled task is configured with a specific execution frequency, but it fails to run according to the set frequency. (This problem is caused by the inaccurate time on the user's server.)
This document uses the Ubuntu operating system as an example to briefly describe how to adjust the system time zone using command lines.
Commands may differ slightly for other operating systems. Consult the relevant documentation for specific instructions.
Open a terminal and run the following command to view the current time zone setting of the system:
timedatectl
You can run the following command to view a list of all available time zones:
timedatectl list-timezones
You can also use the grep command to search for a specific city. The following is an example.
timedatectl list-timezones | grep Los_Angeles
Once you have determined which time zone to use, you can set the system time zone with the following command:
Replace America/Los_Angeles with your chosen time zone. Executing this command will immediately update the system time zone.
sudo timedatectl set-timezone America/Los_Angeles
Run the timedatectl command again to view the current time zone.
Ensure that the output now displays your newly set time zone.
You are advised to add the time zone parameter to the JVM as well.
Use the JPS -v command to query the JVM parameters and check whether the time zone has been set, as shown in the following figure.
If there are no time zone settings:
1. For Linux systems: Add the following content to the catalina.sh/setenv.sh file in Tomcat installation directory/bin, and restart the project after completing the configuration.
-Duser.timezone=America/Los_Angeles
2. For Windows systems: Add the following content to the catalina.bat file in Tomcat installation directory/bin, and restart the project after completing the configuration.
You are advised to add the parameter -Duser.timezone=America/Los_Angeles at the beginning of the file and place it together with other custom JVM parameters, as shown in the following figure.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy