BladeSystem - General
cancel
Showing results for 
Search instead for 
Did you mean: 

set/check time under RBSU

Anna Cheng
Advisor

set/check time under RBSU


On reboot, I can go to F9, then check/set the time under "Date and Time", but can I do this in the OS level? In particular, I am running linue.

Can I, at least, check whether the time is accurate?

I suspect I can't.

thanks
3 REPLIES
Jimmy Vance
HPE Pro

Re: set/check time under RBSU

If your running Linux

"hwclock --show" will display current hardware clock time

"hwclock --systohc" will set the hardware clock to the current system time

"man hwclock" for other options



__________________________________________________
No support by private messages. Please ask the forum!      I work for HPE

If you feel this was helpful please click the KUDOS! thumb below!   
Anna Cheng
Advisor

Re: set/check time under RBSU

thanks.
Unfortunately it does not work. I tested on one of the servers, while "hwclock --show" showed the correct time, going through F9 to RBSU, the "Date and Time" option showed a different time.
Matti_Kurkela
Honored Contributor

Re: set/check time under RBSU

If the time you get by using "hwclock --show" is different from the time you see in the RBSU, that indicates the Linux system was installed using the "make the hardware clock run in UTC time" option.

In this case, after reading the hardware clock time, the hwclock command will apply the timezone conversion from UTC to local time.

To verify this, run "cat /etc/adjtime" and check the third line: it will say either "UTC" or "LOCAL". If it says "LOCAL", the system clock is configured to run in local time and the "date" output is supposed to match with what you're seeing in RBSU. If it says "UTC", the system clock runs in UTC time and you should compare "date -u" with what you're seeing in RBSU.

Linux, like all Unix-like operating systems, uses UTC as the fundamental internal timescale. All the time values handled by the operating system are converted to UTC on input; all the time values the system displays are converted back to local time on output.

The only reason Linux even has the option to run the hardware clock in local time is that Linux is sometimes installed alongside with Windows in a dual-boot system. As far as I know, no version of Windows on an x86 platform can deal with a hardware clock running in UTC. This is the legacy of MS-DOS.

Using UTC as the system time allows the system to deal with DST transitions in a robust fashion: as long as the timezone information is correct, the system can make all DST<->Standard transitions in a fully automated fashion, regardless of whether the system was running or shut down at the time of the DST transition.

MK
MK