Editing Timezone
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | Time difference between Hardware Node and | + | Time difference between Hardware Node and VPS |
− | During the distribution (redhat/centos) installer, you choose the timezone for your HN. The | + | During the distribution (redhat/centos) installer, you choose the timezone for your HN. The VE template has its own preconfigured timezone. So, its very possible for the zones to differ. |
− | To resolve the problem, | + | |
+ | To resolve the problem, You should configure your VE 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 | <pre>rm -rf /etc/localtime 2>/dev/null; unlink /etc/localtime 2>/dev/null | ||
Line 18: | Line 19: | ||
You can find many more exciting timezones with: | 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 | + | Or, here is a shell script that will let you change the timezones in ALL of your VPS's: |
<pre>#! /bin/bash | <pre>#! /bin/bash | ||
for f in `ls /vz/private` | for f in `ls /vz/private` | ||
do | do | ||
− | vzctl exec $f rm -f /etc/localtime 2>/dev/null | + | vzctl exec $f rm -rf /etc/localtime 2>/dev/null |
+ | vzctl exec $f unlink /etc/localtime 2>/dev/null | ||
vzctl exec $f ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime | vzctl exec $f ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime | ||
done</pre> | done</pre> | ||
[[Category:HOWTO]] | [[Category:HOWTO]] |