![]() | ![]() | ![]() | ![]() |
|
faq search add article cool-stuff how-to main tips |
Posted by Jason on Wednesday March 28, @10:21PMfrom the Time-Warp dept. If you would like to check what time your system is set to, or set your date and time- try the date command. [Check the Date and Time] To check the date and time on your system, login is any user and issue the date command like so: $ date Wed Mar 28 20:55:47 AKST 2001 Notice the time is shown as a 24 hour clock- 20:55 is 8:55PM, in the USA this is known as military time. Also notice the timezone info, in my case AKST (Alaska Standard Time -9 GMT). [Setting the Date and Time] There are a couple of ways to set the date and time. You can set it manually with the date command, or by using an internet time server with the ntpdate command. [Set the Time Manually] To set the date and time as it is displayed in the above example, login as root and issue the date command with the following parameters: Login: root Password: ******** # date 010328205547 Here is how to break it down number by number: 01 - The Year: 2001 03 - The Month: March 28 - The Day : 28th 20 - The Hour: 8pm 55 - The Minutes: 55 47 - The seconds: 47 [Set the Time Using a Time Server] If your FreeBSD box has access to the internet, you can use an internet time server to set your date and time. Login as root and issue the ntpdate command: Login: root Password: ******** # ntpdate time.some-time-server.com 28 Mar 20:26:20 ntpdate[591]: adjust time server 192.168.1.251 offset -4.178968 sec Notice that according to the time server at my time provider (bogus ip in my example), my time was off by about 4 seconds. If you would like more information on these commands, I recommend the man pages. man date man ntpdate < | >
|
|
||||||||||||||||||||
|
||||||||||||||||||||||
| "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate |
|
| All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann. |