# Time management on openVZ nodes?



## Jasson.Pass (Sep 19, 2014)

I have a VPS container which time is off by several hours. How would I fix that? Do I need to fix the host node so that it's time is in sync?


----------



## Patrick (Sep 19, 2014)

http://openvz.org/Timezone


----------



## raj (Sep 19, 2014)

That's only if it's a timezone issue.   If the host node is grossly off actual time, they can install NTPd on the host to sync with some NIST pool.   You'll have to have your provider do that.


----------



## nunim (Sep 19, 2014)

Several hours is usually a wrong timezone, try reconfiguring timezone, i.e.

Debian:

dpkg-reconfigure tzdata

CentOS:

mv /etc/localtime /etc/localtime.bak

ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

 

If this is OpenVZ host node time is off, you can update it on the node via:

ntpdate pool.ntp.org

 

Or you can add sys_time to a container and set it, i.e:

 


vzctl stop 101

vzctl set 101  --capability sys_timen --save

vzctl start 101

vzctl exec 101 ntpdate pool.ntp.org

 

If this is OpenVZ and you're not the admin, you'll have to ask your host to correct the time difference for you.


----------

