3

I know that there is several ways to setup system timezone on CentOS host. What I would like to know is the meaning of this Host timezone which seems to be set by default and is reported by timedatectl utility

$timedatectl

      Local time: Tue 2019-04-02 13:13:25 CEST
  Universal time: Tue 2019-04-02 11:13:25 UTC
        RTC time: n/a
       Time zone: Host (CEST, +0200)
     NTP enabled: n/a
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2019-03-31 01:59:59 CET
                  Sun 2019-03-31 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2019-10-27 02:59:59 CEST
                  Sun 2019-10-27 02:00:00 CET

This Host timezone setting does not seem good enough for particularly java applications when I do define system timezeone to more meaningfull Country/City setting, like this:

$ timedatectl 
      Local time: Tue 2019-04-02 13:32:05 CEST
  Universal time: Tue 2019-04-02 11:32:05 UTC
        RTC time: Tue 2019-04-02 13:32:05
       Time zone: Europe/Amsterdam (CEST, +0200)
    ....

that is used by JVM by setting its user.timezone system property to the same Country/City. If however the Host timezone setting is in effect, JVM does ignore this completely and sets user.timezone to GMT+01:00 which differs from Host (CEST, +0200) and confuses me. Summarizing above

  1. What is the meaning of the timezone named Host?
  2. Why it is not respected by JVM
  3. Once I change timezone to some Country/City, is there a way to reset it back to Host (if that makes sense at all)?
  • I think I found some satisfactory answers for my question will publish them later .. – Tagwint Apr 2 at 20:42
0

Personally I have never see that "host" value, do you have this entry when you type:

timedatectl list-timezones | grep -i host

I think no because the only value that not have country/city is "UTC". And why you don't just use Europe/Amsterdam TZ , it's also in CEST and +2h00 GMT.

  • 1. No the 'Host' timezone is not there in the list. 2. I do use, but just using some known timezone does not answer the question :) – Tagwint Apr 2 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.