• No related posts.

      • No related posts.

        • No related posts.

          • No related posts.

              No related posts.

            FreeBSD tips : Setting time and date

            It’s definitely a good thing to have your system clock sync itself each time you reboot using a public NTP Timeserver. FreeBSD makes this a piece of cake.

            First, you’ll want to make sure your timezone is set correctly. Check /usr/share/zoneinfo for the correct time zone file, and copy it to /etc/localtime. I.e.:

            bash-2.05b# mv /usr/share/zoneinfo/zonefilehere /etc/localtime

            Once you’ve done that, you will need to make sure your date and time are set within at least a few minutes of the current date and time. To do this, use the date command:

            bash-2.05b# date 0408290000

            The date is in YYMMDDHHMM format, the clock being a 24 hour and not 12 hour clock. To make sure the date looks correct before moving on, just type date in again:

            bash-2.05b# date
            Sun Aug 29 00:00:33 MDT 2004

            Now that our timezone, date, and time are all set correctly, lets setup the NTP daemon to keep the system time synced-up.To do this, open /etc/rc.conf in your editor of choice, and add these lines:

            ntpdate_enable=”YES”
            ntpdate_program=”ntpdate”
            ntpdate_flags=”-b timeserver.org”

            Replace timeserver.org with a server from a public NTP timeserver list which is near you (by number of network hops, not necessarily physical location). You’ll need to Google for a list of these yourself. Voila!

            Related posts:

            1. IP GRE tunnel between Juniper and FreeBSD
            This entry was posted in BSD, FreeBSD and tagged , , .

            One Response to “FreeBSD tips : Setting time and date”

            1. FreeBSD tips : Setting time and date | Stop Dreaming Start Action Says:

              [...] More: FreeBSD tips : Setting time and date [...]

            Leave a Reply