Green Posted July 17, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 61 Reputation: 0 Joined: 04/28/13 Last Seen: November 4, 2022 Share Posted July 17, 2013 Sir, Can i Know How To Change my Server Time... What Tool do i need to use And can u teach me step by step..thx Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 17, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 10 hours ago Share Posted July 17, 2013 1. We can look at the current date and time of a CentOS server by typing "date" in the SSH terminal or PuTTy.exe. 2. You ll notice that it?s probably not what you want. CentOS uses the file /etc/localtime to determine what the timezone you want to use is. If the contents of that file aren?t what you?re looking for?we?ll need to replace it. First, lets get rid of that file since it?s wrong anyway. We?ll rename it to localtime.bak. 3 .Since CentOS now no longer has a proper localtime file, you can run the date command again and see that it just uses the universal time now. We need a new /etc/localtime file with the right stuff. Rather than make a new file, we?ll create a symlink to an already existing timezone file. They're all located in /usr/share/zoneinfo. Find the one you want in there. For this example, I?m setting the server to central time. So /usr/share/zoneinfo/Asia/Manila will work for me. Just find whichever timezone file corresponds to the one you want to set your server to. Now, let's make that link. Run the date command again and you should be good to go! 4. Restart your server to take effect1. We can look at the current date and time of a CentOS server by typing "date" in the SSH terminal or PuTTy.exe. 2. You ll notice that it?s probably not what you want. CentOS uses the file /etc/localtime to determine what the timezone you want to use is. If the contents of that file aren?t what you?re looking for?we?ll need to replace it. First, lets get rid of that file since it?s wrong anyway. We?ll rename it to localtime.bak. 3 .Since CentOS now no longer has a proper localtime file, you can run the date command again and see that it just uses the universal time now. We need a new /etc/localtime file with the right stuff. Rather than make a new file, we?ll create a symlink to an already existing timezone file. They're all located in /usr/share/zoneinfo. Find the one you want in there. For this example, I?m setting the server to central time. So /usr/share/zoneinfo/Asia/Manila will work for me. Just find whichever timezone file corresponds to the one you want to set your server to. Now, let's make that link. Run the date command again and you should be good to go! 4. Restart your server to take effect Quote Link to comment Share on other sites More sharing options...
Green Posted July 17, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 61 Reputation: 0 Joined: 04/28/13 Last Seen: November 4, 2022 Author Share Posted July 17, 2013 Thx A lot Patskie Quote Link to comment Share on other sites More sharing options...
Question
Green
Sir, Can i Know How To Change my Server Time...
What Tool do i need to use And can u teach me step by step..thx
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.