OpenVZ Forum


Home » General » Support » Correct Way to Manage System Time & VPS Time
Correct Way to Manage System Time & VPS Time [message #31267] Mon, 23 June 2008 19:15 Go to next message
VinayKAgarwal is currently offline  VinayKAgarwal
Messages: 1
Registered: June 2008
Junior Member
Hello,
I lease a VPS using openvz (CentOS 5) where I am having difficulty setting time correctly to my desired timezome (America/Los_Angeles). At 10:48am PDT, my server shows 6:57pm - both the timezone and the minutes are incorrect although date display show the correct timezone as follows

[root@server /]# date
Tue Jun 17 18:57:51 PDT 2008

I can't set time even under root as shown below

[root@server /]# date 06171026.10
date: cannot set date: Operation not permitted

My questions are

1. What are the best hardware clock settings for a vps provider? Should it sync with time server regularly? Should it be set to UDT or any local timezone would do?

2. What are the best clock settings for a vps lessee beyond setting own timezone?
Re: Correct Way to Manage System Time & VPS Time [message #31282 is a reply to message #31267] Tue, 24 June 2008 04:54 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
I believe container time is tied to the host node's time. So you can't really change it. The only thing you can change is the timezone. The best way to do that is to:

ln -s /usr/share/zoneinfo/{desired-timezone} /etc/localtime

I guess your provider doesn't have the host node syncing time with an ntpd server. If it was, your time would be correct.

I found one wiki article on time:

http://wiki.openvz.org/Timezone

It really is trying to solve a different problem... where your hardware node time is correct and configured with the desired timezone... and OS Templates that were pre-configured with different timezones and you want to make them all the same. It is just fine to have them different if desired.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: segfaults on ve networking startup
Next Topic: vzpkgcache on Fedora 7 template
Goto Forum:
  


Current Time: Fri Nov 15 03:14:09 GMT 2024

Total time taken to generate the page: 0.03271 seconds