{"id":179,"date":"2015-04-27T13:23:54","date_gmt":"2015-04-27T13:23:54","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=179"},"modified":"2025-04-22T13:04:00","modified_gmt":"2025-04-22T07:34:00","slug":"changing-vps-timezone","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/changing-vps-timezone\/","title":{"rendered":"Changing VPS Time Zone"},"content":{"rendered":"\n<p>It is assumed, though not necessary, that you have already installed a hosting panel like <a href=\"https:\/\/en.wikipedia.org\/wiki\/Kloxo\" target=\"_blank\" rel=\"noopener\">Kloxo<\/a> or <a href=\"https:\/\/en.wikipedia.org\/wiki\/Virtualmin\" target=\"_blank\" rel=\"noopener\">Virtualmin<\/a>.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"changing-the-timezone-in-openvz\"><span id=\"Changing_timezone_in_OpenVZ\" class=\"mw-headline\">Changing the timezone in OpenVZ<\/span><\/h2>\n\n\n<p>The file <i>\/etc\/localtime<\/i> is the one that holds information on the server\u2019s timezone.<\/p>\n\n\n\n<p>We shall point it to the correct zone file by creating a soft link.<\/p>\n\n\n\n<p>Run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># cd \/etc\n# mv localtime localtime.bak\n# ln -sf \/usr\/share\/zoneinfo\/Asia\/Calcutta localtime\n# reboot\n<\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"changing-timezone-in-xen\"><span id=\"Changing_timezone_in_Xen\" class=\"mw-headline\">Changing timezone in Xen<\/span><\/h2>\n\n\n<p>1. Change the timezone using the steps mentioned above for OpenVZ<\/p>\n\n\n\n<p>2. Run the following command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># echo 1 &gt; \/proc\/sys\/xen\/independent_wallclock\n<\/pre>\n\n\n\n<p>3. Installed ntp<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install ntp\n<\/pre>\n\n\n\n<p>4. Turned on service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># chkconfig ntpd on\n<\/pre>\n\n\n\n<p>5. Synchronized the system clock with 0.pool.ntp.org server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># ntpdate pool.ntp.org\n<\/pre>\n\n\n\n<p>6. Started the NTP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \/etc\/init.d\/ntpd start\n<\/pre>\n\n\n\n<p>7. Reboot the VPS<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># reboot\n<\/pre>\n\n\n\n<p>Now you will notice that after rebooting the VPS it again shows the wrong time.<\/p>\n\n\n\n<p>Actually, you have to set the independent clock every time you reboot the server. To do this, put the following lines in <i>\/etc\/rc.local<\/i>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># service ntpd stop\n# echo 1 &gt; \/proc\/sys\/xen\/independent_wallclock\n# ntpdate pool.ntp.org\n# service ntpd start\n<\/pre>\n\n\n\n<p>You would now get the correct timezone and correct time every time you reboot your Xen VPS.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-time-zone-in-a-cpanel-installed-server\"><span id=\"Setting_Time_Zone_in_a_cPanel_installed_server\" class=\"mw-headline\">Setting Time Zone in a cPanel installed server<\/span><\/h2>\n\n\n<p>1. Open a web browser and connect to your cPanel Control Panel located at <a class=\"external free\" href=\"https:\/\/ip_address:2087\/\" rel=\"nofollow\" target=\"_blank\">https:\/\/ip_address:2087<\/a>.<\/p>\n\n\n\n<p>2. log in as the <b>root<\/b> using the information sent to you in your setup email.<\/p>\n\n\n\n<p>3. From the <b>Server Configuration<\/b> menu, click <b>Server Time<\/b>.<\/p>\n\n\n\n<p>4. Select your time zone from the drop-down list.<\/p>\n\n\n\n<p>5. Click Change TimeZone.<\/p>\n\n\n\n<p>6. Click <b>Sync Time with Time Server<\/b> to sync the time with the time zone.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-005fe055 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">\u00a0Your Clients Deserve Premium Hosting<\/h3><p class=\"uagb-cta__desc\">Deliver blazing-fast, secure hosting under your brand. We handle servers; you build loyalty. Includes free migrations and daily backups.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/reseller-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore Plans<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It is assumed, though not necessary, that you have already installed a hosting panel like Kloxo or Virtualmin. Changing the timezone in OpenVZ The [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":7582,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Changing-VPS-Time-Zone.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Vipin Raj","author_link":"https:\/\/www.veeble.com\/kb\/author\/vipin\/"},"uagb_comment_info":0,"uagb_excerpt":"It is assumed, though not necessary, that you have already installed a hosting panel like Kloxo or Virtualmin. Changing the timezone in OpenVZ The [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":5,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":8672,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/179\/revisions\/8672"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/7582"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}