{"id":97,"date":"2019-05-09T16:53:22","date_gmt":"2019-05-09T16:53:22","guid":{"rendered":"https:\/\/blog.iabsolute.com\/?p=97"},"modified":"2019-05-09T16:53:22","modified_gmt":"2019-05-09T23:53:22","slug":"how-to-change-date-time-and-timezone","status":"publish","type":"post","link":"https:\/\/blog.iabsolute.com\/?p=97","title":{"rendered":"How to change date, time and timezone"},"content":{"rendered":"\n<p>By default, your CentOS or Redhat Server maybe don\u2019t have correct time or timezone. So we have to do the configuration for that.<\/p>\n\n\n\n<p><strong>Step 1: Check your current time <\/strong><\/p>\n\n\n\n<p>[root@ithelpblog ~]# date<br>\nWed Apr 6 10:07:12 UTC 2016<br>\n<\/p>\n\n\n<p>[root@ithelpblog ~]<\/p>\n\n\n\n<p>#\n<\/p>\n\n\n\n<p><strong>Step 2: Get the list for timezone <\/strong><\/p>\n\n\n\n<p>[root@ithelpblog ~]# cd \/usr\/share\/zoneinfo\/<br>\n<\/p>\n\n\n<p>[root@ithelpblog zoneinfo]<\/p>\n\n\n\n<p># ls<br>\nAfrica Australia Cuba Etc GMT-0 Indian Kwajalein Navajo posix ROK UTC<br>\nAmerica Brazil EET Europe GMT+0 Iran Libya NZ posixrules Singapore WET<br>\nAntarctica Canada Egypt GB Greenwich iso3166.tab MET NZ-CHAT PRC Turkey W-SU<br>\nArctic CET Eire GB-Eire Hongkong Israel Mexico Pacific PST8PDT UCT zone.tab<br>\nAsia Chile EST GMT HST Jamaica MST Poland right Universal Zulu<br>\nAtlantic CST6CDT EST5EDT GMT0 Iceland Japan MST7MDT Portugal ROC US<br><\/p>\n\n\n<p>[root@ithelpblog zoneinfo]<\/p>\n\n\n\n<p>#\n<\/p>\n\n\n\n<p><strong>Step 3: We will use timezone in one of the State of America:&nbsp;Chicago<\/strong><\/p>\n\n\n\n<p>[root@ithelpblog zoneinfo]# cd \/usr\/share\/zoneinfo\/America\/<br>\n<\/p>\n\n\n<p>[root@ithelpblog America]<\/p>\n\n\n\n<p># ls<br>\nAdak Boise Dawson Guayaquil Louisville Montreal Rainy_River St_Lucia<br>\nAnchorage Buenos_Aires Dawson_Creek Guyana Lower_Princes Montserrat Rankin_Inlet St_Thomas<br>\nAnguilla Cambridge_Bay Denver Halifax Maceio Nassau Recife St_Vincent<br>\nAntigua Campo_Grande Detroit Havana Managua New_York Regina Swift_Current<br>\nAraguaina Cancun Dominica Hermosillo Manaus Nipigon Resolute Tegucigalpa<br>\nArgentina Caracas Edmonton Indiana Marigot Nome Rio_Branco Thule<br>\nAruba Catamarca Eirunepe Indianapolis Martinique Noronha Rosario Thunder_Bay<br>\nAsuncion Cayenne El_Salvador Inuvik Matamoros North_Dakota Santa_Isabel Tijuana<br>\nAtikokan Cayman Ensenada Iqaluit Mazatlan Ojinaga Santarem Toronto<br>\nAtka Chicago Fortaleza Jamaica Mendoza Panama Santiago Tortola<br>\nBahia Chihuahua Fort_Wayne Jujuy Menominee Pangnirtung Santo_Domingo Vancouver<br>\nBahia_Banderas Coral_Harbour Glace_Bay Juneau Merida Paramaribo Sao_Paulo Virgin<br>\nBarbados Cordoba Godthab Kentucky Metlakatla Phoenix Scoresbysund Whitehorse<br>\nBelem Costa_Rica Goose_Bay Knox_IN Mexico_City Port-au-Prince Shiprock Winnipeg<br>\nBelize Creston Grand_Turk Kralendijk Miquelon Porto_Acre Sitka Yakutat<br>\nBlanc-Sablon Cuiaba Grenada La_Paz Moncton Port_of_Spain St_Barthelemy Yellowknife<br>\nBoa_Vista Curacao Guadeloupe Lima Monterrey Porto_Velho St_Johns<br>\nBogota Danmarkshavn Guatemala Los_Angeles Montevideo Puerto_Rico St_Kitts\n<\/p>\n\n\n\n<p>[root@ithelpblog America]# cp \/usr\/share\/zoneinfo\/America\/Chicago \/etc\/localtime<\/p>\n\n\n\n<p><strong>Step 4: Modify the date\/time on Centos 7<\/strong><\/p>\n\n\n\n<p>date&nbsp;MMDDhhmmYYYY<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>MM: two digit month number<\/li><li>DD: two digit date<\/li><li>hh: two digit hour (24 hour system)<\/li><li>mm: two digit minute<\/li><li>YYYY: four digit of year<\/li><\/ul>\n\n\n\n<p><strong>Step 5: You can use ntp (network time protocol) to auto sync the time in your Centos<\/strong><\/p>\n\n\n\n<p>yum install ntp<\/p>\n\n\n\n<p>ntpdate pool.ntp.org<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, your CentOS or Redhat Server maybe don\u2019t have correct time or timezone. So we have to do the configuration for that. Step 1: Check your current time [root@ithelpblog ~]# date Wed Apr 6 10:07:12 UTC 2016 # Step &hellip; <a href=\"https:\/\/blog.iabsolute.com\/?p=97\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-my-linux"],"_links":{"self":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=97"}],"version-history":[{"count":1,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}