{"id":38066,"date":"2022-08-15T09:00:05","date_gmt":"2022-08-15T01:00:05","guid":{"rendered":"https:\/\/www.casbay.com\/guide\/?post_type=kb&#038;p=38066"},"modified":"2022-09-07T20:14:15","modified_gmt":"2022-09-07T12:14:15","slug":"2-method-linux-vps-server-config-timezone","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/2-method-linux-vps-server-config-timezone","title":{"rendered":"2 Simple Methods Of Configuring Timezone In Linux VPS Server"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"38066\" class=\"elementor elementor-38066\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-67e29df elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"67e29df\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-040bc93\" data-id=\"040bc93\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8bb9477 elementor-widget elementor-widget-text-editor\" data-id=\"8bb9477\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Virtual Private Server (VPS) configuration can either be really complex or at times be really simple such as the changing timezone. As simple it may be, it is vital to have the correct timezone set such as having proper logging in any IT transactional system. The three factors that will be affected by having an improper timezone in a\u00a0<a href=\"https:\/\/www.casbay.com\/vps-hosting-malaysia\" target=\"_blank\" rel=\"noopener\">Linux VPS<\/a> server\u00a0are loggings, automation and, cron jobs.<\/p><p>Setting the timezone improperly will affect the time of your application deployment. Aside from that, if it uses a NTP, it could be worse by having similar problems in various nodes of the network. There are multiple ways of changing the timezone, including using tools to automate it. In this article, the 2 methods we will be using to change the timezones are tzselect and timedatectl. The Linux distribution used in this guide is based on the Ubuntu operating system.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-834773f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"834773f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a665c5e\" data-id=\"a665c5e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-324bca1 elementor-widget elementor-widget-heading\" data-id=\"324bca1\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">tzselect<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-93c8f46 elementor-widget elementor-widget-text-editor\" data-id=\"93c8f46\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The tzselect command is available to all Debian-based distributions such as Ubuntu, Linux Mint, and Elementary OS. This command allows the change of timezone using a command-line interface. Firstly, access your VPS via SSH. Open your terminal by searching it through the application menu or by right-clicking the desktop and selecting the \u201cOpen Terminal\u201d option, then run the following command in the terminal.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-97d7904 elementor-widget elementor-widget-text-editor\" data-id=\"97d7904\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>sudo tzselect<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e922d30 elementor-widget elementor-widget-text-editor\" data-id=\"e922d30\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>After running the command, a list of geographical areas will be shown in the output. Select any region of your needs and you should be able to see the list of timezones available in the selected region. Enter the index number of the region and timezone that you need and you should be done setting your timezone. After setting the timezone, it is safer to verify at least once if the timezone is similar to the one you had set using the following command.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d6f85a3 elementor-widget elementor-widget-text-editor\" data-id=\"d6f85a3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>timedatectl<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-28dc803 elementor-widget elementor-widget-text-editor\" data-id=\"28dc803\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>With this, you have successfully changed your timezone with tzselect command.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a7173fb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a7173fb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8b95bf6\" data-id=\"8b95bf6\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5e24fed elementor-widget elementor-widget-heading\" data-id=\"5e24fed\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">timedatectl<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dd06fdd elementor-widget elementor-widget-text-editor\" data-id=\"dd06fdd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Moving on to the next method of changing timezone using timedatectl command. This is a more detailed version of changing timezone compared to the method earlier. Firstly, similarly to tzselect, look for the available timezones. You are able to list the timezones using the following command.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-08b47fb elementor-widget elementor-widget-text-editor\" data-id=\"08b47fb\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>timedatectl list-timezones<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ee49465 elementor-widget elementor-widget-text-editor\" data-id=\"ee49465\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>A long list of timezones available will appear and it may be hard for the user to pick a proper one, press Ctrl+C to exit the display. To filter out the long list, use the grep command along with the command above to filter the name of the city in which timezone you need, such as the following command.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cc38a2d elementor-widget elementor-widget-text-editor\" data-id=\"cc38a2d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>timedatectl list-timezones | grep &lt;city_name&gt;<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d384577 elementor-widget elementor-widget-text-editor\" data-id=\"d384577\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Replace the \u201c&lt;city_name&gt;\u201d with the city which timezone you need the most to filter the long list. After learning which timezone you needed. use the following command to set the timezone on your system.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-429a661 elementor-widget elementor-widget-text-editor\" data-id=\"429a661\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>sudo timedatectl set-timezone &lt;timezone&gt;<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f5e144 elementor-widget elementor-widget-text-editor\" data-id=\"9f5e144\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Replace the \u201c&lt;timezone&gt;\u201d with the timezone you had selected and run the command. The system\u2019s timezone should be set with this. To verify if it had already been set, use the following command.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f7642a6 elementor-widget elementor-widget-text-editor\" data-id=\"f7642a6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>timedatectl<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80c4d17 elementor-widget elementor-widget-text-editor\" data-id=\"80c4d17\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>You should be able to change the timezone of your system.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Virtual Private Server (VPS) configuration can either be really complex or at times be really simple such as the changing timezone. As simple it may be, it is vital to have the correct timezone set such as having proper logging in any IT transactional system. The three factors that will be affected by having an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":38069,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","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":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"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-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-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-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-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-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-gradient":""}}},"kbtopic":[109],"kbtag":[106,105],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/38066"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=38066"}],"version-history":[{"count":6,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/38066\/revisions"}],"predecessor-version":[{"id":38094,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/38066\/revisions\/38094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media\/38069"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=38066"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=38066"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=38066"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=38066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}