All time zones available on your RHEL system can be found in /usr/share/zoneinfo.Change to that directory, and browse through the directory structure to find the particular time zone you need.
We can change the timezone for the particular website using following methods.
The Apache time zone can be updated in two ways: 1) Using PHP configuration file 2) Using .htaccess file Let us see each of them in detail: 1) Check the global php,ini file location on the server Refer PHP supported timezone here.
The first step is to make sure you have the ntp program installed. So you want to set it as well so that the correct time is maintained after reboot: The above two lines can sometimes prevent ntpd from properly synchronizing your clock.
They are already commented out by default on Cent OS/RHEL 6.
Using NTP you can keep your server’s clock synchronized with super accurate atomic clocks located around the world. Also keep in mind that ntp only affects the system time.
Computer clocks tend to “drift” so regularly synchronizing them with NTP servers helps keep them accurate. The hardware clock on your server will not reflect that.
rhel01 # cd /usr/share/zoneinfo rhel01 # ls Africa Cuba GMT0 Japan Poland Universal America EET GMT-0 Kwajalein Portugal US Antarctica Egypt GMT 0 Libya posix UTC Arctic Eire Greenwich MET posixrules WET Asia EST Hongkong Mexico PRC W-SU Atlantic EST5EDT HST Mideast PST8PDT Australia Etc Iceland MST right Zulu Brazil Europe Indian MST7MDT ROC Canada Factory Iran Navajo ROK CET GB iso3166NZ Singapore Chile GB-Eire Israel NZ-CHAT Turkey CST6CDT GMT Jamaica Pacific UCT rhel01 # cd America rhel01 # ls Adak Cuiaba Juneau North_Dakota Swift_Current Anchorage Curacao Kentucky Ojinaga Tegucigalpa Anguilla Danmarkshavn Knox_IN Panama Thule Antigua Dawson Kralendijk Pangnirtung Thunder_Bay Araguaina Dawson_Creek La_Paz Paramaribo Tijuana Argentina Denver Lima Phoenix Toronto Aruba Detroit Los_Angeles Port-au-Prince Tortola Asuncion Dominica Louisville Porto_Acre Vancouver Atikokan Edmonton Lower_Princes Port_of_Spain Virgin Atka Eirunepe Maceio Porto_Velho Whitehorse Bahia El_Salvador Managua Puerto_Rico Winnipeg Bahia_Banderas Ensenada Manaus Rainy_River Yakutat Barbados Fortaleza Marigot Rankin_Inlet Yellowknife Belem Fort_Wayne Martinique Recife Belize Glace_Bay Matamoros Regina Blanc-Sablon Godthab Mazatlan Resolute Boa_Vista Goose_Bay Mendoza Rio_Branco Bogota Grand_Turk Menominee Rosario Boise Grenada Merida Santa_Isabel Buenos_Aires Guadeloupe Metlakatla Santarem Cambridge_Bay Guatemala Mexico_City Santiago Campo_Grande Guayaquil Miquelon Santo_Domingo Cancun Guyana Moncton Sao_Paulo Caracas Halifax Monterrey Scoresbysund Catamarca Havana Montevideo Shiprock Cayenne Hermosillo Montreal Sitka Cayman Indiana Montserrat St_Barthelemy Chicago Indianapolis Nassau St_Johns Chihuahua Inuvik New_York St_Kitts Coral_Harbour Iqaluit Nipigon St_Lucia Cordoba Jamaica Nome St_Thomas Costa_Rica Jujuy Noronha St_Vincent rhel01 # ls -l Santiago -rw-r--r--.
About this time last year, I noted that our build machines at work were way out of sync in their respective local times.
In my case, the reported date on the broken systems was April 5, not March 8. See the end of this article for a note on potential files to the aforementioned location (I didn’t know which file I really needed, so I just grabbed both).
These files will overwrite the existing versions, so you may want to back those old versions up, just to be safe.
5) Save the file 6) Restart Apache service Note: Custom can be used instead of editing global on the server.