{"id":3001,"date":"2020-04-11T09:39:25","date_gmt":"2020-04-11T04:09:25","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=3001"},"modified":"2020-04-11T09:43:25","modified_gmt":"2020-04-11T04:13:25","slug":"how-to-change-timezone-in-openvz-ve-environment","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/","title":{"rendered":"How To Change Timezone in OpenVZ VE Environment"},"content":{"rendered":"\n<p>How To Change Timezone in OpenVZ VE Environment<\/p>\n\n\n\n<p>Steps to set the time zone for a particular node in VPS. Login into your NODE\/OpenVZ Master Server via SSH and Stop the VE with this command below:<\/p>\n\n\n\n<p><br>1. Login to the main host node.(SSH).<\/p>\n\n\n\n<p>2. Stop the node(container) which you want to set time.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vzctl stop VZID<\/code><\/pre>\n\n\n\n<p>3. Set the container to have capability to change the time zone.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vzctl set VZID -\u2013capability sys_time:on \u2013-save<\/code><\/pre>\n\n\n\n<p>For example<\/p>\n\n\n<p>~]# vzctl set 11 &#8211;capability sys_time:on &#8211;save<br \/>\nCT configuration saved to \/etc\/vz\/conf\/11.conf<br \/>\n[@~]# <\/p>\n\n\n\n<p>4. Start the container.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vzctl start VZID<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Login in to the container and Change your local timezone.<br>To find correct time zone location, do this command to search exiting timezones<\/li><\/ol>\n\n\n<p># find \/usr\/share\/zoneinfo\/ | more<br \/>\n# mv \/etc\/localtime \/etc\/localtime_bk<br \/>\n# ln -s \/usr\/share\/zoneinfo\/Asia\/Jakarta \/etc\/localtime<\/p>\n\n\n\n<p>6. Set the date<\/p>\n\n\n\n<p>In Cpanel server it will not work sometime. In that case follow below steps.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rpm -qi tzdata<\/code><\/pre>\n\n\n\n<p>It will show output like below<\/p>\n\n\n<p>ame        : tzdata<br \/>\nVersion     : 2019c<br \/>\nRelease     : 1.el7<br \/>\nArchitecture: noarch<br \/>\nInstall Date: Thu Sep 26 19:00:20 2019<br \/>\nGroup       : System Environment\/Base<br \/>\nSize        : 2018657<br \/>\nLicense     : Public Domain<br \/>\nSignature   : RSA\/SHA256, Thu Sep 26 07:20:57 2019, Key ID 24c6a8a7f4a80eb5<br \/>\nSource RPM  : tzdata-2019c-1.el7.src.rpm<br \/>\nBuild Date  : Thu Sep 26 06:34:13 2019<br \/>\nBuild Host  : x86-01.bsys.centos.org<br \/>\nRelocations : (not relocatable)<br \/>\nPackager    : CentOS BuildSystem <http:\/\/bugs.centos.org><br \/>\nVendor      : CentOS<br \/>\nURL         : https:\/\/www.iana.org\/time-zones<br \/>\nSummary     : Timezone data<br \/>\nDescription :<\/p>\n\n\n\n<p>Run below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date &amp;&amp; date -u &amp;&amp; rdate -p rdate.cpanel.net &amp;&amp; ntpdate -qv clock.isc.org<\/code><\/pre>\n\n\n\n<p>If you are getting below error.<\/p>\n\n\n<p>Fri Apr 10 21:09:50 CDT 2020<br \/>\nSat Apr 11 02:09:50 UTC 2020<br \/>\nrdate: [rdate.cpanel.net]       Fri Apr 10 20:48:23 2020<\/p>\n<p>-bash: ntpdate: command not found<\/p>\n\n\n\n<p>In that case you have to install ntpdate command on server<\/p>\n\n\n<p>yum install ntpdate<br \/>\nLoaded plugins: fastestmirror, tsflags, universal-hooks<br \/>\nLoading mirror speeds from cached hostfile<br \/>\n * EA4: 185.53.12.144<br \/>\n * cpanel-addons-production-feed: 185.53.12.144<br \/>\n * cpanel-plugins: 185.53.12.144<br \/>\n * base: centos.mirror.ate.info<br \/>\n * extras: centos.mirrors.proxad.net<br \/>\n * updates: centos.mirror.ate.info<br \/>\nEA4                                                                                                                                                               | 2.9 kB  00:00:00<br \/>\ncpanel-addons-production-feed                                                                                                                                     | 2.9 kB  00:00:00<br \/>\ncpanel-plugins                                                                                                                                                    | 2.9 kB  00:00:00<br \/>\nMariaDB101                                                                                                                                                        | 2.9 kB  00:00:00<br \/>\nbase                                                                                                                                                              | 3.6 kB  00:00:00<br \/>\nextras                                                                                                                                                            | 2.9 kB  00:00:00<br \/>\nupdates                                                                                                                                                           | 2.9 kB  00:00:00<br \/>\nvz-base                                                                                                                                                           |  951 B  00:00:00<br \/>\nvz-updates                                                                                                                                                        |  951 B  00:00:00<br \/>\nResolving Dependencies<br \/>\n&#8211;> Running transaction check<br \/>\n&#8212;> Package ntpdate.x86_64 0:4.2.6p5-29.el7.centos will be installed<br \/>\n&#8211;> Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>=========================================================================================================================================================================================<br \/>\n Package                                   Arch                                     Version                                                 Repository                              Size<br \/>\n=========================================================================================================================================================================================<br \/>\nInstalling:<br \/>\n ntpdate                                   x86_64                                   4.2.6p5-29.el7.centos                                   base                                    86 k<\/p>\n<p>Transaction Summary<br \/>\n=========================================================================================================================================================================================<br \/>\nInstall  1 Package<\/p>\n<p>Total download size: 86 k<br \/>\nInstalled size: 121 k<br \/>\nIs this ok [y\/d\/N]: y<br \/>\nDownloading packages:<br \/>\nntpdate-4.2.6p5-29.el7.centos.x86_64.rpm                                                                                                                          |  86 kB  00:00:00<br \/>\nRunning transaction check<br \/>\nRunning transaction test<br \/>\nTransaction test succeeded<br \/>\nRunning transaction<br \/>\n  Installing : ntpdate-4.2.6p5-29.el7.centos.x86_64                                                                                                                                  1\/1<br \/>\n  Verifying  : ntpdate-4.2.6p5-29.el7.centos.x86_64                                                                                                                                  1\/1<\/p>\n<p>Installed:<br \/>\n  ntpdate.x86_64 0:4.2.6p5-29.el7.centos<\/p>\n<p>Complete!<\/p>\n\n\n\n<p>Once done execute same command again<\/p>\n\n\n<p>date &#038;&#038; date -u &#038;&#038; rdate -p rdate.cpanel.net &#038;&#038; ntpdate -qv clock.isc.org<br \/>\nFri Apr 10 21:10:47 CDT 2020<br \/>\nSat Apr 11 02:10:47 UTC 2020<br \/>\nrdate: [rdate.cpanel.net]       Fri Apr 10 20:49:20 2020<\/p>\n<p>10 Apr 21:10:47 ntpdate[2724]: ntpdate 4.2.6p5@1.2349-o Thu Aug  8 11:48:00 UTC 2019 (1)<br \/>\nserver 64.62.194.189, stratum 3, offset -1286.770695, delay 0.17567<br \/>\nserver 204.93.207.11, stratum 3, offset -1286.764660, delay 0.12953<br \/>\nserver 64.62.194.188, stratum 3, offset -1286.778583, delay 0.17670<br \/>\nserver 2001:470:1:b07::123:2001, stratum 0, offset 0.000000, delay 0.00000<br \/>\nserver 2001:1838:2000:41b::123:2000, stratum 0, offset 0.000000, delay 0.00000<br \/>\nserver 2001:470:1:b07::123:2000, stratum 0, offset 0.000000, delay 0.00000<br \/>\n10 Apr 21:10:56 ntpdate[2724]: step time server 204.93.207.11 offset -1286.764660 sec<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rdate -s rdate.cpanel.net\nntpdate -v clock.isc.org<\/code><\/pre>\n\n\n<p>10 Apr 20:49:56 ntpdate[2768]: ntpdate 4.2.6p5@1.2349-o Thu Aug  8 11:48:00 UTC 2019 (1)<br \/>\n10 Apr 20:50:05 ntpdate[2768]: adjust time server 204.93.207.11 offset 0.404790 sec<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How To Change Timezone in OpenVZ VE Environment Steps to set the time zone for a particular node in VPS. Login into your NODE\/OpenVZ Master Server via SSH and Stop the VE with this command below: 1. Login to the main host node.(SSH). 2. Stop the node(container) which you want to set time. 3. Set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"class_list":["post-3001","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"How To Change Timezone in OpenVZ VE Environment Steps to set the time zone for a particular node in VPS. Login into your NODE\/OpenVZ Master Server via SSH and Stop the VE with this command below: 1. Login to the main host node.(SSH). 2. Stop the node(container) which you want to set time. 3. Set [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-11T04:09:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-11T04:13:25+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/\",\"name\":\"How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2020-04-11T04:09:25+00:00\",\"dateModified\":\"2020-04-11T04:13:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Change Timezone in OpenVZ VE Environment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/","og_locale":"en_US","og_type":"article","og_title":"How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog","og_description":"How To Change Timezone in OpenVZ VE Environment Steps to set the time zone for a particular node in VPS. Login into your NODE\/OpenVZ Master Server via SSH and Stop the VE with this command below: 1. Login to the main host node.(SSH). 2. Stop the node(container) which you want to set time. 3. Set [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-04-11T04:09:25+00:00","article_modified_time":"2020-04-11T04:13:25+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/","name":"How To Change Timezone in OpenVZ VE Environment | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2020-04-11T04:09:25+00:00","dateModified":"2020-04-11T04:13:25+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-change-timezone-in-openvz-ve-environment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Change Timezone in OpenVZ VE Environment"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=3001"}],"version-history":[{"count":4,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3001\/revisions"}],"predecessor-version":[{"id":3005,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3001\/revisions\/3005"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=3001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=3001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=3001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}