What Is My Timezone Linux?
Contents

How can I see timezone in Linux?

The default system timezone is stored in /etc/timezone (which is often a symbolic link to the timezone data file specific to the timezone). If you do not have an /etc/timezone, look at /etc/localtime. Generally that is the “server’s” timezone. /etc/localtime is often a symlink to a timezone file in /usr/share/zoneinfo.

How do I find system timezone?

  1. import java. util. TimeZone; …
  2. public static void main(String[] args) { //get Calendar instance.
  3. Calendar now = Calendar. getInstance(); //get current TimeZone using getTimeZone method of Calendar class.
  4. TimeZone timeZone = now. getTimeZone(); //display current TimeZone using getDisplayName() method of TimeZone class.
  5. } }

14 июл. 2019 г.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest