When I do who -b; uptime I get
system boot 2021-10-12 17:05 16:36:09 up 30 min, 1 user, load average: 0.00, 0.00, 0.00
As you can see the boot time reported by the last command is ahead. I have noted it is one hour ahead after a reboot.
I have checked the system time in the BIOS before booting Linux and it is correct.
--
Gerard Hooton.
Hi,
When I do who -b; uptime I get
system boot 2021-10-12 17:05 16:36:09 up 30 min, 1 user, load average: 0.00, 0.00, 0.00
As you can see the boot time reported by the last command is ahead. I have noted it is one hour ahead after a reboot.
I have checked the system time in the BIOS before booting Linux and it is correct.
I don't know how exactly it comes but I guess it has something to do with local vs. system time. You have UTC as timezone but because of DST it's one hour apart.
What does last report?
On my test system I find the reboot which is shown in the who -b output in the last output, and the uptime reported by last again matches with the uptime output.
Regards, Simon
On 12.10.2021, at 17:41, Hooton, Gerard g.hooton@ucc.ie wrote:
When I do who -b; uptime I get
system boot 2021-10-12 17:05 16:36:09 up 30 min, 1 user, load average: 0.00, 0.00, 0.00
As you can see the boot time reported by the last command is ahead. I have noted it is one hour ahead after a reboot.
I have checked the system time in the BIOS before booting Linux and it is correct.
What do you mean with “correct”? UTC or localtime?
For me timedatectl gives me
``` $ timedatectl … RTC in local TZ: no … ```
Which means that RTC/BIOS clock is in UTC, so when booting the timezone offset is added. I heard that dual boot with Windows makes problems because Windows is setting RTC always with local time. In that case try "RTC in local TZ: yes"
Do you dualboot? What is timedatectl telling you?
Best Regards, Markus
Not a dual boot.
timedatectl
Local time: Wed 2021-10-13 08:37:56 IST Universal time: Wed 2021-10-13 07:37:56 UTC RTC time: Wed 2021-10-13 08:37:56 Time zone: Europe/Dublin (IST, +0100) System clock synchronized: yes NTP service: active RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
I use the command 'timedatectl set-local-rtc 0' as suggested above and that fixed the problem.
-----Original Message----- From: Markus Falb <wnefal@gmail.commailto:Markus%20Falb%20%3cwnefal@gmail.com%3e> Reply-To: CentOS mailing list <centos@centos.orgmailto:CentOS%20mailing%20list%20%3ccentos@centos.org%3e> To: CentOS mailing list <centos@centos.orgmailto:CentOS%20mailing%20list%20%3ccentos@centos.org%3e> Subject: Re: [CentOS] Boot time in wtmp is not correct Date: Wed, 13 Oct 2021 00:36:13 +0200 Mailer: Apple Mail (2.3608.120.23.2.7)
[EXTERNAL] This email was sent from outside of UCC.
On 12.10.2021, at 17:41, Hooton, Gerard <
g.hooton@ucc.ie
wrote:
When I do who -b; uptime I get
system boot 2021-10-12 17:05
16:36:09 up 30 min, 1 user, load average: 0.00, 0.00, 0.00
As you can see the boot time reported by the last command is ahead.
I have noted it is one hour ahead after a reboot.
I have checked the system time in the BIOS before booting Linux and it is correct.
What do you mean with “correct”? UTC or localtime?
For me timedatectl gives me
```
$ timedatectl
…
RTC in local TZ: no
…
```
Which means that RTC/BIOS clock is in UTC, so when booting the timezone offset
is added. I heard that dual boot with Windows makes
problems because Windows is setting RTC always with local time. In
that case try "RTC in local TZ: yes"
Do you dualboot? What is timedatectl telling you?
Best Regards, Markus
_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos
https://lists.centos.org/mailman/listinfo/centos
--
Gerard Hooton. Senior Technical Officer School of Engineering. University College Cork. College Road. Cork. Ireland. Loc8: WDR-04-60G Tel: +353 21 4902296 Mobile: +353 852813491
On 13.10.21 09:44, Hooton, Gerard wrote:
Not a dual boot.
timedatectl
Local time: Wed 2021-10-13 08:37:56 IST Universal time: Wed 2021-10-13 07:37:56 UTC RTC time: Wed 2021-10-13 08:37:56 Time zone: Europe/Dublin (IST, +0100) System clock synchronized: yes NTP service: active RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
I use the command 'timedatectl set-local-rtc 0' as suggested above and that fixed the problem.
hwclock is maybe also of interest. Check $ man hwclock
-- Leon