![]() |
|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
How to adjust time? How to use OpenNTPD and configure it?
|
|
|||
![]()
https://www.openbsd.org/faq/faq10.html#OpenNTPD
Quote:
|
|
|||
![]()
sorry, I had read the first article but still confused. I want to auto sync time when booting. Which command should I run and add it to which file?
|
|
|||
![]()
OpenNTP is enabled out of the box as a default. Typically, it is within 200 msec and is substantially smaller and more secure (smaller attack surface and fewer cve's) than ntp which is a port option:
net/ntp Last edited by shep; 3 Weeks Ago at 09:52 PM. |
|
|||
![]()
my system current time is Mon Feb 3 05:44:58 GMT 2025, I want to use Shanghai time, I had edit sysctl.conf and add this line:
Quote:
|
|
||||
![]()
To change the timezone you should follow the OpenBSD FAQ[1].
Basically, do not change kern.utc_offset unless you want your hardware clock to be different than UTC, which is only important for multibooting. To change the time zone to Shanghai you should do (as root) : # ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [1] https://www.openbsd.org/faq/faq10.html#TimeZone |
|
|||
![]()
thanks, I had executed that command but my time is still incorrect. I have two disks with OpenBSD and linux installed separately. How to do with it?
|
|
||||
![]()
The ArchWiki claims that Ubuntu & Fedora will use localtime if they detect a Windows system when installing:
https://wiki.archlinux.org/title/Sys..._Ubuntu/Fedora So if the OP had Windows on that machine when installing Linux they might have to change the Linux system to UTC: Code:
timedatectl set-local-rtc 0 Code:
hwclock --systohc
__________________
Para todos todo, para nosotros nada |
|
|||
![]()
Sorry, I don't understand.
My time is 14:56 PM CST, system time is 08:56 AM GMT. I adjusted time use date command and I got 14:56 PM GMT. My time zone is CST not GMT. |
|
|||
![]()
Most systems have a hardware clock and a system clock.
https://wiki.archlinux.org/title/System_time. Unix/Linux based systems set the hardware clock to UTC which is preserved by the cmos battery when the system is powered off. On boot, the hardware clock is read and the system offset applied to generate system time, aka local time. The offset for CST is UTC-6. NTP initially adjusts the System clock which, at some point, updates the hardware clock. Windows sets the hardware clock to local time. This can have issues with emails sent from an Eastern Time zone, say at 4pm, which arrive at an Pacific Time zone at 1pm. Another issue is with security updates - most systems balk at security updates from the future ![]() Last edited by shep; 3 Weeks Ago at 01:16 AM. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unmounting/Syncing takes forever | paulr | NetBSD Installation and Upgrading | 3 | 11th June 2017 03:43 AM |
System clock's frequency | e1-531g | OpenBSD General | 1 | 25th September 2015 05:03 PM |
REQUEST: Programm for changing the clock | m1tk0 | Programming | 3 | 16th January 2010 06:43 PM |
configure clock in xfce | delboy | FreeBSD General | 7 | 3rd September 2008 06:36 PM |
can't set clock? | carpman | FreeBSD General | 31 | 7th July 2008 11:26 PM |