Knowledgebase

How To Update VPS Timezone (OpenVZ)

Your OpenVZ will reflect the host server's time settings by default; however, it is possible to configure your VPS to use a custom timezone, such as the one you (or your users) reside in.

1. To set your server's timezone, first log in as the root user via SSH, then run the following command to list all available timezones:

# find /usr/share/zoneinfo/

 

2. You can use grep to refine the search:

# find /usr/share/zoneinfo/ | grep -i Johannes


Result:

/usr/share/zoneinfo/right/Africa/Johannesburg
/usr/share/zoneinfo/posix/Africa/Johannesburg
/usr/share/zoneinfo/Africa/Johannesburg

 

3. Once you have selected a timezone, create a symbolic link to /etc/localtime:

# ln -f -s /usr/share/zoneinfo/right/Africa/Johannesburg /etc/localtime

 

4. To verify the timezone change, use date:

# date
  • 0 Users Found This Useful
Was this answer helpful?