Support Center > Search Results > SecureKnowledge Details
Output of "date" command shows wrong date and time on R77.30 Gaia OS deployed over Hyper-V infrastructure in Windows Server Technical Level
Symptoms
  • Wrong date and time is displayed on R77.30 Gaia OS deployed over Hyper-V infrastructure in Windows Server.

  • Output of "date" command executed repeatedly in Expert mode varies greatly (date, time and year change randomly).

    Example:

    [Expert@HostName:0]# date
    Mon May  5 23:46:54 CEST 2014
    [Expert@HostName:0]# date
    Wed May  5 05:46:55 CEST 2021
    [Expert@HostName:0]# date
    Wed Sep 21 05:46:21 CEST 2022
    [Expert@HostName:0]# date
    Mon May  5 05:21:57 CEST 2014
    [Expert@HostName:0]# date
    Thu May  5 05:05:02 CEST 2005
    
  • "select() to /dev/rtc to wait for clock tick timed out" error when executing "hwclock --show" command or "clock" command in Expert mode.

  • "crond[PID]: (jobuser) CMD (/sbin/hwclock --hctosys)" appears repeatedly in /var/log/messages file.

  • Output of "hwclock --directisa" command executed in Expert mode shows correct date and time.

Cause

In some cases, the date/time stored in a Real Time Clock (RTC) can be corrupted, e.g., due to loss of power, before it has been initially set, etc.
When this occurs, reading of the date/time from RTC can fail because the Linux kernel determines that the RTC contains invalid data.

For technical details, refer to http://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=5606df53d3997e3495d78f6ae6b9dd45c46861a2.


Solution
Note: To view this solution you need to Sign In .