Incorret time in bash-prompt and logs on XOA
-
Hello, the time looks correct when i run
timedatectl. However, you can see that that the time in my bash prompt is not correct. This is in a different timezone. The logs are also an hour off. Is this a bug? I can't find a time setting inside XOA. How does the env variable get updated?[14:21 18] xoa@xoa:~$ timedatectl Local time: Sat 2025-10-18 15:24:17 EDT Universal time: Sat 2025-10-18 19:24:17 UTC RTC time: Sat 2025-10-18 19:24:17 Time zone: US/Eastern (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: no [14:24 18] xoa@xoa:~$[14:24 18] xoa@xoa:~$ echo $TZ EST [14:24 18] xoa@xoa:~$[14:24 18] xoa@xoa:~$ last reboot reboot system boot 6.1.0-40-amd64 Sat Oct 18 14:16 still running reboot system boot 6.1.0-40-amd64 Sat Oct 18 14:14 - 14:15 (00:01) reboot system boot 6.1.0-40-amd64 Fri Oct 17 20:24 - 08:55 (12:30) reboot system boot 6.1.0-40-amd64 Fri Oct 17 20:21 - 20:24 (00:03) reboot system boot 6.1.0-40-amd64 Fri Oct 17 20:12 - 20:20 (00:08) -
@Danp Yup, that fixed the time and the logs also. Thanks!
[12:42 19] xoa@xoa:~$ timedatectl Local time: Sun 2025-10-19 12:42:55 EDT Universal time: Sun 2025-10-19 16:42:55 UTC RTC time: Sun 2025-10-19 16:42:55 Time zone: America/New_York (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: no [12:42 19] xoa@xoa:~$ last reboot reboot system boot 6.1.0-40-amd64 Sun Oct 19 12:42 still running reboot system boot 6.1.0-40-amd64 Sun Oct 19 08:27 - 12:42 (04:15) reboot system boot 6.1.0-40-amd64 Sun Oct 19 08:18 - 08:26 (00:08) reboot system boot 6.1.0-40-amd64 Sat Oct 18 15:16 - 08:17 (17:01) -
Hi,
Have you checked https://docs.xen-orchestra.com/xoa#timezone ?
-
I ran that tool and tried both the US/Eastern and America/New_York but I'm still getting a time zone that does not account for daylight savings time. I did reboot inbetween each different
sudo dpkg-reconfigure tzdataregion selection.[07:22 19] xoa@xoa:timesyncd.conf.d$ sudo dpkg-reconfigure tzdata Current default time zone: 'US/Eastern' Local time is now: Sun Oct 19 08:23:19 EDT 2025. Universal Time is now: Sun Oct 19 12:23:19 UTC 2025. [07:24 19] xoa@xoa:timesyncd.conf.d$ sudo dpkg-reconfigure tzdata Current default time zone: 'America/New_York' Local time is now: Sun Oct 19 08:25:59 EDT 2025. Universal Time is now: Sun Oct 19 12:25:59 UTC 2025. [07:27 19] xoa@xoa:~$ date Sun Oct 19 07:27:30 AM EST 2025 [07:27 19] xoa@xoa:~$ last reboot reboot system boot 6.1.0-40-amd64 Sun Oct 19 07:27 still running reboot system boot 6.1.0-40-amd64 Sun Oct 19 07:18 - 07:26 (00:08) -
Have you checked timesync? (the paragraph after in the doc)
-
The bash prompt may be displaying the incorrect time due to these lines in /etc/bash.bashrc --
# Default user timezone is EST if [ -z "$TZ" ] then export TZ=EST fiAre you getting the expected result if you comment out this section of code and then reboot?
-
@Danp said in Incorret time in bash-prompt and logs on XOA:
The bash prompt may be displaying the incorrect time due to these lines in /etc/bash.bashrc --
# Default user timezone is EST if [ -z "$TZ" ] then export TZ=EST fiAre you getting the expected result if you comment out this section of code and then reboot?
Had the same issue myself, and removing that helped.
-
Interesting. Let me add @Team-DevOps so we might improve the bashrc
-
@Danp Yup, that fixed the time and the logs also. Thanks!
[12:42 19] xoa@xoa:~$ timedatectl Local time: Sun 2025-10-19 12:42:55 EDT Universal time: Sun 2025-10-19 16:42:55 UTC RTC time: Sun 2025-10-19 16:42:55 Time zone: America/New_York (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: no [12:42 19] xoa@xoa:~$ last reboot reboot system boot 6.1.0-40-amd64 Sun Oct 19 12:42 still running reboot system boot 6.1.0-40-amd64 Sun Oct 19 08:27 - 12:42 (04:15) reboot system boot 6.1.0-40-amd64 Sun Oct 19 08:18 - 08:26 (00:08) reboot system boot 6.1.0-40-amd64 Sat Oct 18 15:16 - 08:17 (17:01) -
O olivierlambert marked this topic as a question on
-
O olivierlambert has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login