User login

Who's online

There are currently 0 users and 16 guests online.

Shoutbox

sentono: testing shoutbox :)
sentono: please type something here :)
Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
All Shouts

Recent comments

Syndicate

Syndicate content

How To Set Date, Time and Timezone FreeBSD

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

$cd /usr/share/zoneinfo
$ls -al ( this command will shows all Timezone
$cp /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

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):

$export TZ=America/Los_Angeles
$<code>date

It will shows the Timezone Loas Angeles Date and Time.

Always update when your server is rebooted.

$pico /etc/rc.local

### add this line below ###


/usr/sbin/ntpdate ntp.nasa.gov

### save this file

 

 





Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use [break] to create page breaks.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <br> <p> <h1> <h2> <h3> <h4> <h5> <pre>
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Donate

Does this site make your life easier? Help me keep it online.

YM! Status