how to set time?

Sorry for this question, but how to set hour in FreBSD. I set the time zone at installation but after starting X I realize that my clock is not set.

there is a tool for setting time?

tahnks
 
Thanks guys
I add in /etc/rc.conf
Code:
ntpdate_enable="YES"
and create the file /etc/ntp.conf
and add
Code:
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server pool.ntp.org
driftfile /var/db/ntp.drift
 
I'd advise using openntpd (from ports), which will not open a listener on port 123 (which only ntp servers need) unless you tell it to.
 
I also advise, if possible, to use the ISP's ntp server.
 
Sure. I lack enthusiasm for the pool.ntp.org servers. I've seen weird (big) time shifts (and associated alerts from panicking applications) when using those. They're not exactly 'professional' time servers, and they vary wildly in stratum quality.
 
Running openntpd on 7.1-STABLE (Jan 6 & Jan 8 builds) without a hitch. Haven't recompiled recently; the binary is dated March 4.
 
hirohitosan said:
Thanks guys
I add in /etc/rc.conf
Code:
ntpdate_enable="YES"
Do note that ntpdate will only set/correct the time when the system is booted.
If you want to keep the time correct continuously try ntpd (base) or openntpd (port).
 
Thanks again.
I installed openntpd (from ports), and add in rc.conf
ntpd_enable="YES"
and crate /etc/ntpd.conf, add time server, reboot (I couldn't find a more elegant way) and seems to work well.
 
You'll need openntpd_enable="YES" .. and openntpd's config is in /usr/local/etc/ntpd.conf !
 
Why you don't read handbook ? It's FREE :e

Basic Configuration

If you only wish to synchronize your clock when the machine boots up, you can use ntpdate(8). This may be appropriate for some desktop machines which are frequently rebooted and only require infrequent synchronization, but most machines should run ntpd(8).

Using ntpdate(8) at boot time is also a good idea for machines that run ntpd(8). The ntpd(8) program changes the clock gradually, whereas ntpdate(8) sets the clock, no matter how great the difference between a machine's current clock setting and the correct time.

To enable ntpdate(8) at boot time, add ntpdate_enable="YES" to /etc/rc.conf. You will also need to specify all servers you wish to synchronize with and any flags to be passed to ntpdate(8) in ntpdate_flags.

To ensure the NTP server is started at boot time, add the line ntpd_enable="YES" to /etc/rc.conf. If you wish to pass additional flags to ntpd(8), edit the ntpd_flags parameter in /etc/rc.conf.

To start the server without rebooting your machine, run ntpd being sure to specify any additional parameters from ntpd_flags in /etc/rc.conf. For example:

# ntpd -p /var/run/ntpd.pid
 
Back
Top