• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • PKI Training
  • OpenSSL
  • Keytool
  • PKI Tools
    • Apereo CAS
    • SAML
    • OpenID Connect
  • Get expert help

Ubuntu Time Settings

June 15, 2022 by Mister PKI Leave a Comment

This article will demonstrate how to manage Ubuntu time settings. The examples provided in this article were completed with Ubuntu 20.04.4 LTS, but should work for any recent version of Ubuntu. If not, leave us a comment and we will update accordingly.

To check your version of Ubuntu, run the following command:

lsb_release -a

In this case, the result is:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

Ubuntu Timezones

For some apparent reason you have discovered the time on your Ubuntu server is not correct. Either it is entirely incorrect or just in another time zone. You may have discovered the time was off if you troubleshoot logs or use dates in any way that later do not line up with what you are expecting. It’s common to find the time set to UTC time, but you may want it set to your local time zone instead. This example will demonstrate how to set your time zone to ET (encompassing EST and EDT).

If you haven’t already, run the date command to show your current time.

date

In this case the result was:

Wed Jun 15 10:41:56 EDT 2022

To display the list of time zones in Ubuntu, run the following command:

timedatectl list-timezones

Choose the time zone local to you and set it with the following command. In this case for ET, EST, or EDT, it is the America/New_York timezone.

timedatectl set-timezone America/New_York

Now run the date command again to ensure the Ubuntu time zone has synced.

Ubuntu time sync

To display the time sync settings in Ubuntu, use the systemd-timesyncd status by running the following command:

systemctl status systemd-timesyncd

You may wish to sync with a different NTP server than configured by default. To do so, modify the /etc/systemd/timesyncd.conf file by uncommenting the NTP and FallbackNTP properties and changing them to your desired settings. ntp.ubuntu.com is the default NTP server sync for Ubuntu, so we decided to leave that as the fallback in this case.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.
[Time]
NTP=your.ntp.com
FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

Save the file and restart the systemd-timesyncd process.

service systemd-timesyncd restart

Display the systemd-timesyncd status again to show the updated NTP settings.

Conclusion

There you have it. The examples above have demonstrated how to manage Ubuntu time settings including how to sync Ubuntu time with an NTP server as well as change the time zone. Let us know in the comments if you would like to see additional examples of Ubuntu time settings or if you have any questions. Check out our other articles.

linux,  Ubuntu

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Posts

PKCS12

openssl s_client

Keytool

Keytool list

ECDSA vs RSA

OpenSSL

PKCS7

Certificate Decoder

PKI for DevOps Engineers – Free Training Series

PKI for DevOps Training Hub

Lesson 1 – How TLS and PKI Work

Lesson 2 – Understanding X.509 Certificates

Lesson 3 – Certificate Chains Explained

Lesson 4 – Debug TLS with OpenSSL

Lesson 5 – Verify Certificate Chains

Lesson 6 – Creating CSRs with OpenSSL

Lesson 7 – Working with PKCS12 Certificates

Lesson 8 – Java Keystores and keytool

Lesson 9 – Certificate Expiration Monitoring

Lesson 10 – Automating Certificate Renewal

Lesson 11 – Common TLS Errors

Lesson 12 – PKI Architecture for DevOps

Recent Posts

  • Apache mod_auth_cas: Protect Web Applications with Apereo CAS and Docker
  • Apache mod_auth_mellon: Configure SAML SSO & Docker
  • Configure OpenID Connect (OIDC) in Apereo CAS 7.3 and 8
  • Certificate Ownership Is an Operating Model Problem, Not a Tooling Problem
  • OpenSSL dgst: Create Checksums and Verify Digital Signatures

Footer

  • Twitter
  • YouTube
Mister PKI

Practical security engineering for the systems that establish trust.

Learn OpenSSL Keytool Free training
Work together PKI consulting CAS consulting Sponsored contributions
Site About Support Mister PKI Cookie policy Search
© 2026 Mister PKI Secure systems. Clear guidance.