Changing date, time and timezone on FreeBSD

This guide is for those who use FreeBSD and loves the shell

To check the date and time
date

This is what the output may look like.

The data above shows Tuesday January 27 04:52:15 PHT 2009. To change it you have to gain root privileges and type something like this (format)
date yyMMddhhmm

For example, you want to change the date/time to Tuesday January 27 12:32:00 PHT 2009, you have to type
date 0901271253

To check if the new time was set, type
date
and you should see the new settings.

To check your timezone,
less /etc/localtime
If it does not point to anything then that is the default timezone you have entered in the installation of the operating system.e

Suppose you want to change your timezone do the following, (we will use Asia/Manila). Create a symbolic link that will point /etc/localtime to one of the values under the /usr/share/zoneinfo tree
ln -s /usr/share/zoneinfo/Asia/Manila /etc/localtime

Check the /usr/share/zoneinfo tree for more timezones available
ls /usr/share/zoneinfo

To verify that your timezone was changed,

ls -l /etc/localtime

You will now see that /etc/localtime is now a symbolic link to the file /usr/share/zoneinfo/Asia/Manila