📖 ~1 min read
Table of contents
Symptom & Impact
HTTPS package repositories fail certificate validation due to incorrect host time.
Environment & Reproduction
Common after VM resume or BIOS clock drift.
sudo apt update
Root Cause Analysis
System clock outside certificate validity window causes TLS handshake failures.
Quick Triage
Compare system time, RTC, and synchronization state.
date
timedatectl status
Step-by-Step Diagnosis
Inspect timesync service and NTP reachability.
systemctl status systemd-timesyncd
journalctl -u systemd-timesyncd -n 80

Solution – Primary Fix
Enable NTP sync and correct the system clock, then retry apt.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo timedatectl set-ntp true
sudo systemctl restart systemd-timesyncd
sudo apt update

Solution – Alternative Approaches
Use internal NTP servers in restricted enterprise networks.
sudo timedatectl timesync-status
Verification & Acceptance Criteria
System reports synchronized clock and HTTPS repository requests succeed.
timedatectl status
sudo apt update
Rollback Plan
Revert to previous NTP configuration if enterprise compliance requires custom source.
sudo systemctl restart systemd-timesyncd
Prevention & Hardening
Continuously monitor time drift and enforce NTP policy via configuration management.
Related Errors & Cross-Refs
Can appear as certificate not yet valid or certificate expired for apt endpoints.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu timedatectl and systemd-timesyncd administration references.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.