Consistent date and time formats across Linux systems help maintain reliable logs, schedules, and processes. The timedatectl utility, part of systemd, enables precise configuration of the system locale, date, and timezone from the command line. This approach is ideal for headless servers or situations where a graphical environment is not available.
Command-line configuration allows for greater control and scripting capabilities when managing date and time settings. With timedatectl and related tools, administrators can customize regional formats, synchronize systems over networks, and ensure accurate timestamps in logs. Adjusting locale and timezone values also prevents confusion caused by inconsistent or incorrect system settings.
Direct access through the terminal helps verify every change, providing immediate feedback on the system’s current status. This method aligns date and time settings with organizational requirements while supporting a uniform workflow. It also simplifies maintenance tasks by offering a transparent view of system-wide configurations.
Steps to adjust system date and time formats in Linux:
- Open a terminal to access the command line.
- List available locales.
$ locale -a en_US.utf8 en_GB.utf8
- Generate a required locale if it is missing.
$ sudo locale-gen en_US.UTF-8 Generating locales... en_US.UTF-8... done
- Update the system locale.
$ sudo update-locale LANG=en_US.UTF-8
- Display the current date to confirm changes.
$ date Tue Mar 2 14:00:00 UTC 2025
- Check the current settings.
$ timedatectl status Local time: Tue 2025-03-02 14:00:00 UTC Universal time: Tue 2025-03-02 14:00:00 UTC RTC time: Tue 2025-03-02 14:00:00 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: active RTC in local TZ: no
- Set the system timezone.
$ sudo timedatectl set-timezone America/New_York
- Verify that the new timezone is active.
$ timedatectl status Local time: Tue 2025-03-02 09:00:00 EST Universal time: Tue 2025-03-02 14:00:00 UTC RTC time: Tue 2025-03-02 14:00:00 Time zone: America/New_York (EST, -0500) System clock synchronized: yes NTP service: active RTC in local TZ: no

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.