1. Home
  2. Technical
  3. Timezone on ZoneOS servers

Timezone on ZoneOS servers

On servers with the ZoneOS platform, the server time is UTC regardless of the physical location of the server (on servers in Tallinn and Amsterdam, the time is UTC).

PHP

In the php.ini file, the time zone is set according to the physical location of the server. For servers located in Tallinn, the php.ini file is set to Europe/Tallinn. The PHP time zone can be changed by creating a .user.ini file and adding it there:

date.timezone = Europe/Stockholm

MariaDB/MySQL

MariaDB servers set the time zone according to the physical location of the server. You can change the MariaDB time zone by sending the following command to SQL Server after establishing a connection:

SET time_zone = 'Europe/Stockholm';

Crontab

HTTP crontab always runs in the Tallinn time zone.

When configuring crontab operation, you can specify the time zone in which it will run.

SSH/bash/shell

The default time zone in the SSH shell is UTC. To change the time zone of the shell, run the following command:

export TZ=Europe/Tallinn

If you want the time zone to always change when you log in, add this line to the .bashrc file:

echo 'export TZ=Europe/Tallinn' >> ~/.bashrc

Apache log files

Apache registers strings in the UTC time zone.

Node.js

To change the time zone of a Node.js script, you must set the TZ environment variable before running the process. For example:

env TZ=Europe/Stockholm node script.js

Sphinx

To change the time zone of Sphinx, you need to add Sphinx to the startup script:

TZ=Europe/Tallinn

 

Updated on 4. Apr 2024
Was this article helpful?

Related Articles