Linux - How to check my timezone

By xngo on July 5, 2019

In this short tutorial, I will show you different ways to find the timezone of your computer.

Using date

You can use the date command to find out your current timezone.

date
# Output: Fri Jul  5 17:35:59 EDT 2019

For my case, my timezone is EDT, which is Eastern Daylight Time.

Alternatively, you can use %Z option to print only the timezone or use %z to print the numeric timezone.

date +'%Z %z'
# Output: EDT -0400

Using timedatectl

Running timedatectl without any options will show the time overview of your system, including your timezone. Here is an example.

timedatectl
# Output:
# -----------
#      Local time: Fri 2019-07-05 17:44:07 EDT
#  Universal time: Fri 2019-07-05 21:44:07 UTC
#        RTC time: Fri 2019-07-05 21:44:07
#       Time zone: Etc/UTC (EDT, -0400)
# Network time on: yes
#NTP synchronized: yes
# RTC in local TZ: no

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.