How can i change/update date/time/timezone in FreeBSD from command line?

Changing date/time in FreeBSD operating system is not much different from what we use in normal linux operating systems which i had explained in this howto: Change date/time in linux from command prompt.

To display the date:

Simply type the date command to display the current date:

# date


Fri MarĀ  12 12:44:29 IST 2008

To set/change date:

To set the date, you need to simply use the date command followed by the year, month, day, hour, minute, and second … all numeric and no spaces.

To set the date with date command, you need to follow this format:

# date yymmddhhMMss


yy : Year (01-12)

mm : Month (01-12)

dd : Day (01-31)

hh : Hour (00-23)

MM : Minute (01-59)

ss : Seconds (00-59)

So, to set the date to 15-Feb-2009, 12:14 PM, we need to do like this:

# date 0902151214


Tue Feb 15 12:14:00 IST 2009

Set time without modifying date:

To set the time to 03:37 PM without modifying date, use this command:

# date 1537

Change Timezone:

To setup or change the timezone in freebsd, please refer to this post Change Timezone in Linux/Unix

If you enjoyed this post, make sure you subscribe to my RSS feed!!!!

No related content found.