Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Timezone

23 bytes removed, 10:47, 11 March 2008
VPS, VE -> container, some fixes
Time difference between Hardware Node and VPScontainer.
During the distribution (redhat/centos) installer, you choose the timezone for your HN. The VE container template has its own preconfigured timezone. So, its it is very possible for the zones to differ.
 To resolve the problem, You you should configure your VE container to have the same timezone as the HN. For example, if EST is your preferred timezone:
<pre>rm -rf /etc/localtime 2>/dev/null; unlink /etc/localtime 2>/dev/null
You can find many more exciting timezones with:
find /usr/share/zoneinfo/ | more  
Or, here is a shell script that will let you change the timezones in ALL of your VPS'scontainers:
<pre>#! /bin/bash
for f in `ls /vz/private`
do
vzctl exec $f rm -rf /etc/localtime 2>/dev/nullvzctl exec $f unlink /etc/localtime 2>/dev/null
vzctl exec $f ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime
done</pre>
[[Category:HOWTO]]