Synchronizing your computer clock to UTC

Some applications such as WSJT-X requires your computer clock to be synchronized to UTC within ±1 second.

NICT provides a public NTP server, ntp.nict.jp, and here is one of the ways to utilize the service with your Linux machines.

With recent distributions of Ubuntu (16.04 and later), timedatectl / timesyncd (a part of systemd) replace ntpdate / ntp.

user1@Asrock ~ % timedatectl status                   
      Local time: Wed 2018-04-04 08:44:25 JST
  Universal time: Tue 2018-04-03 23:44:25 UTC
        RTC time: Tue 2018-04-03 23:44:25
       Time zone: Asia/Tokyo (JST, +0900)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

This shows the current status of time and time configuration. The NTP servers to fetch time is specified in /etc/systemd/timesyncd.conf.

/etc/systemd/timesyncd.conf

[Time]
NTP=ntp.nict.jp
FallbackNTP=ntp.jst.mfeed.ad.jp

user1@Asrock ~ % sudo systemctl -l status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-04-04 06:40:05 JST; 1h 42min ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 800 (systemd-timesyn)
   Status: "Synchronized to time server [2001:df0:232:eea0::fff3]:123 (ntp.nict.jp)."
    Tasks: 2 (limit: 4915)
   Memory: 1.7M
      CPU: 31ms
   CGroup: /system.slice/systemd-timesyncd.service
           └─800 /lib/systemd/systemd-timesyncd

Apr 04 06:40:05 Asrock systemd[1]: Starting Network Time Synchronization...
Apr 04 06:40:05 Asrock systemd[1]: Started Network Time Synchronization.
Apr 04 06:40:35 Asrock systemd-timesyncd[800]: Synchronized to time server [2001:df0:232:eea0::fff3]:123 (ntp.nict.jp).

With macOS, you can change your NTP server with System Preferences -> Date & Time.