You are not logged in.

#1 2022-10-15 12:43:10

sfabius
Member
Registered: 2007-07-07
Posts: 153

[SOLVED] Date issue (not because hwclock in localtime!)

So I have recently arrived in San Jose CA, and have changed the timezone to America/Los_Angeles (same time zone).

ls -la /etc/localtime 
lrwxrwxrwx 1 root root 41 Oct 13 01:47 /etc/localtime -> ../usr/share/zoneinfo/America/Los_Angeles

The 'date' command is still displaying in EDT, which is where I started before coming to San Jose:

# date
Sat Oct 15 08:26:13 AM EDT 2022

Weirdly, hwclock displays the same time (slight offset for actually issuing commands):

# hwclock
2022-10-15 08:30:20.934653-04:00

BUT,

# timedatectl status
               Local time: Sat 2022-10-15 05:37:20 PDT
           Universal time: Sat 2022-10-15 12:37:20 UTC
                 RTC time: Sat 2022-10-15 12:37:20
                Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

So how is the date command showing the time in EDT when timedatectl gives PDT?
And more importantly, how does one fix it?
I've worked through everything in the wiki.

Last edited by sfabius (2022-10-15 13:39:34)

Offline

#2 2022-10-15 13:29:52

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] Date issue (not because hwclock in localtime!)

echo $TZ
unset TZ
date

Offline

#3 2022-10-15 13:39:08

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: [SOLVED] Date issue (not because hwclock in localtime!)

Thanks that did it, although at fist I was puzzled since I unset TZ for root.
I do not remember setting this, odd, but maybe jet lag?

Offline

Board footer

Powered by FluxBB