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
- What is the meaning of the timezone named
Host
? - Why it is not respected by JVM
- Once I change timezone to some Country/City, is there a way to reset it back to
Host
(if that makes sense at all)?