Let’s start the discussion about How to set date timezone in Linux in following methods.
Contents
Set date timezone in Linux
timedatectl
is a command-line application for viewing and changing the system’s time and date. It is available on all recent Linux systems that are systemd-based. To see the current time zone, run the following command without any options or arguments: timedatectl
# To view timezone
timedatectl
timedatectl
is a command-line application that allows you to view and Before you change the time zone, you must first determine the lengthy name of the time zone you intend to use. The time zone name convention is often “Region/City.”
Use the timedatectl
command or list the files in the /usr/share/zoneinfo
directory to see all available time zones:
#list all available timezones
timedatectl list-timezones
# updating the timezone
sudo timedatectl set-timezone your_time_zone
Example:
sudo timedatectl set-timezone America/New_York
Set timezone in debian via terminal
Use the below command to set the timezone in debian via terminal. Hope it works!
sudo timedatectl set-timezone
I hope the strategies listed above work for you. Happy coding and come back again.
Similar Post : How to restart mariadb in Ubuntu