Here is the simple and fastest How To Set Date, Time and Timezone in FreeBSD.
Login into your FreeBSD box with root access.
$
Set Date, Time
$date yymmddhhss
* yy : Year in two digit
* mm : Month (1-12)
* dd : Day (1-31)
* hh : Hours (0..23)
* ss : Seconds
For example following command set date to 10-Sept-2006, 4:27 PM (remember you must be a root user to set date and time)
$date 06091021627
Next, Setup a Timezone Info
Date command and use of environment variable
You can also use TZ environment variable to display date and time according to your timezone. For example to display the current time in California you need to export TZ as follows (assuming that you are using bash shell):
It will shows the Timezone Loas Angeles Date and Time.
Always update when your server is rebooted.
### save this file
Post new comment