Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Timezone incorrect information
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jhfecchio
n00b
n00b


Joined: 10 Dec 2014
Posts: 8

PostPosted: Sat Mar 01, 2025 4:36 am    Post subject: Timezone incorrect information Reply with quote

No matter what I do, timezone information does not work as intended. Using Openrc. Any tips?


$ sudo cp /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime

$ date
Sat Mar 1 01:00:34 -03 2025

$ ntpdate pool.ntp.org
1 Mar 01:31:09 ntpdate[9988]: step time server 200.160.7.196 offset +1573.759250 sec

$hwclock --local
2025-03-01 04:06:11.707802-03:00

$ hwclock --utc
2025-03-01 01:06:15.107809-03:00
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55459
Location: 56N 3W

PostPosted: Sat Mar 01, 2025 11:17 am    Post subject: Reply with quote

jhfecchio,

What do you have in
Code:
/etc/timezone


America/Sao_Paulo is the right answer.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23701

PostPosted: Sat Mar 01, 2025 2:41 pm    Post subject: Reply with quote

Also, what is the output of declare -p TZ? That variable can locally override the effect of /etc/timezone. A bare date shows me time consistent with my /etc/timezone. TZ=zone date instead shows me time in the specified zone.
Back to top
View user's profile Send private message
jhfecchio
n00b
n00b


Joined: 10 Dec 2014
Posts: 8

PostPosted: Tue Mar 11, 2025 6:41 pm    Post subject: Reply with quote

# cat /etc/timezone
America/Sao_Paulo

# date
ter 11 mar 2025 15:39:48 -03

# ls -l /etc/localtime
lrwxrwxrwx 1 root root 37 mar 11 15:39 /etc/localtime -> /usr/share/zoneinfo/America/Sao_Paulo

# declare -p TZ
declare -x TZ="America/Sao_Paulo"

# date
ter 11 mar 2025 15:40:09 -03
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1097
Location: Somewhere in Denmark

PostPosted: Tue Mar 11, 2025 8:01 pm    Post subject: Reply with quote

Is the date/clock actually wrong?

Isn't 17:00 (approx.) correct for now in Sao Paulo - UTC 20:00? (Sao Paulo is UTC -3, correct?)
Am I missing something? Or is it that the date-output is showing -03 instead of a timezone?
Back to top
View user's profile Send private message
jhfecchio
n00b
n00b


Joined: 10 Dec 2014
Posts: 8

PostPosted: Tue Mar 11, 2025 8:09 pm    Post subject: Reply with quote

date-output is showing -03 instead of a timezone, that's the issue.

Besides kerberos is acting weird because of the 5min limit clock skew.
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1097
Location: Somewhere in Denmark

PostPosted: Tue Mar 11, 2025 8:28 pm    Post subject: Reply with quote

I believe the -03 is the expected output according to
Code:
ns ~ # ls -l /usr/share/zoneinfo/America/Sao_Paulo
-rw-r--r-- 2 root root 1430 Feb 18 16:44 /usr/share/zoneinfo/America/Sao_Paulo
ns ~ # zdump /usr/share/zoneinfo/America/Sao_Paulo
/usr/share/zoneinfo/America/Sao_Paulo  Tue Mar 11 17:25:04 2025 -03
for me it's
Code:
ns ~ # zdump /usr/share/zoneinfo/Europe/Copenhagen
/usr/share/zoneinfo/Europe/Copenhagen  Tue Mar 11 21:26:29 2025 CET

You expected... BRT? for me that doesn't seem to be defined/exist
Code:
ns ~ # ls -l /usr/share/zoneinfo/
total 420
drwxr-xr-x  2 root root   4096 Jan 23 17:16 Africa
drwxr-xr-x  6 root root   4096 Jan 23 17:16 America
drwxr-xr-x  2 root root   4096 Feb  3  2024 Antarctica
drwxr-xr-x  2 root root   4096 Apr 27  2023 Arctic
drwxr-xr-x  2 root root   4096 Jan 23 17:16 Asia
drwxr-xr-x  2 root root   4096 Jan 23 17:16 Atlantic
drwxr-xr-x  2 root root   4096 Apr 27  2023 Australia
drwxr-xr-x  2 root root   4096 Apr 27  2023 Brazil
-rw-r--r--  2 root root   2933 Feb 18 16:44 CET
-rw-r--r--  1 root root   3592 Feb 18 16:44 CST6CDT
drwxr-xr-x  2 root root   4096 Mar  3  2024 Canada
drwxr-xr-x  2 root root   4096 Apr 27  2023 Chile
-rw-r--r--  2 root root   2416 Feb 18 16:44 Cuba
-rw-r--r--  1 root root   2262 Feb 18 16:44 EET
-rw-r--r--  1 root root    182 Feb 18 16:44 EST
-rw-r--r--  1 root root   3552 Feb 18 16:44 EST5EDT
-rw-r--r--  2 root root   2399 Feb 18 16:44 Egypt
-rw-r--r--  2 root root   3492 Feb 18 16:44 Eire
drwxr-xr-x  2 root root   4096 Apr 27  2023 Etc
drwxr-xr-x  2 root root   4096 Jan 23 17:16 Europe
-rw-r--r--  1 root root    116 Feb 18 16:44 Factory
-rw-r--r--  7 root root   3664 Feb 18 16:44 GB
-rw-r--r--  7 root root   3664 Feb 18 16:44 GB-Eire
-rw-r--r-- 10 root root    114 Feb 18 16:44 GMT
-rw-r--r-- 10 root root    114 Feb 18 16:44 GMT+0
-rw-r--r-- 10 root root    114 Feb 18 16:44 GMT-0
-rw-r--r-- 10 root root    114 Feb 18 16:44 GMT0
-rw-r--r-- 10 root root    114 Feb 18 16:44 Greenwich
-rw-r--r--  1 root root    329 Feb 18 16:44 HST
-rw-r--r--  2 root root   1233 Feb 18 16:44 Hongkong
-rw-r--r-- 14 root root    148 Feb 18 16:44 Iceland
drwxr-xr-x  2 root root   4096 Apr 27  2023 Indian
-rw-r--r--  2 root root   1248 Feb 18 16:44 Iran
-rw-r--r--  3 root root   2388 Feb 18 16:44 Israel
-rw-r--r--  2 root root    482 Feb 18 16:44 Jamaica
-rw-r--r--  2 root root    309 Feb 18 16:44 Japan
-rw-r--r--  2 root root    302 Feb 18 16:44 Kwajalein
-rw-r--r--  2 root root    625 Feb 18 16:44 Libya
-rw-r--r--  2 root root   2933 Feb 18 16:44 MET
-rw-r--r--  1 root root    360 Feb 18 16:44 MST
-rw-r--r--  1 root root   2460 Feb 18 16:44 MST7MDT
drwxr-xr-x  2 root root   4096 Jan 23 17:16 Mexico
-rw-r--r--  4 root root   2437 Feb 18 16:44 NZ
-rw-r--r--  2 root root   2054 Feb 18 16:44 NZ-CHAT
-rw-r--r--  4 root root   2460 Feb 18 16:44 Navajo
-rw-r--r--  5 root root    561 Feb 18 16:44 PRC
-rw-r--r--  1 root root   2852 Feb 18 16:44 PST8PDT
drwxr-xr-x  2 root root   4096 Apr 27  2023 Pacific
-rw-r--r--  2 root root   2654 Feb 18 16:44 Poland
-rw-r--r--  3 root root   3527 Feb 18 16:44 Portugal
-rw-r--r--  2 root root    761 Feb 18 16:44 ROC
-rw-r--r--  2 root root    617 Feb 18 16:44 ROK
-rw-r--r--  3 root root    401 Feb 18 16:44 Singapore
-rw-r--r--  3 root root   1933 Feb 18 16:44 Turkey
-rw-r--r--  8 root root    114 Feb 18 16:44 UCT
drwxr-xr-x  2 root root   4096 Apr 27  2023 US
-rw-r--r--  8 root root    114 Feb 18 16:44 UTC
-rw-r--r--  8 root root    114 Feb 18 16:44 Universal
-rw-r--r--  2 root root   1535 Feb 18 16:44 W-SU
-rw-r--r--  3 root root   3527 Feb 18 16:44 WET
-rw-r--r--  8 root root    114 Feb 18 16:44 Zulu
-rw-r--r--  1 root root   4791 Feb 18 16:44 iso3166.tab
-rw-r--r--  1 root root   5069 Feb 18 16:44 leap-seconds.list
-rw-r--r--  1 root root   3257 Feb 18 16:44 leapseconds
lrwxrwxrwx  1 root root     25 May 29  2020 right -> /usr/share/zoneinfo-leaps
-rw-r--r--  1 root root 107170 Feb 18 16:44 tzdata.zi
-rw-r--r--  1 root root  18779 Feb 18 16:44 zone.tab
-rw-r--r--  1 root root  17553 Feb 18 16:44 zone1970.tab
-rw-r--r--  1 root root   8071 Feb 18 16:44 zonenow.tab
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum