Set current day time in Linux to BIOS hardware clock

Saturday, 27th November 2010

Strangely enough my date showed one hour earlier than the local time that is actually here in Holland.
I don’t understand why this happened but obviously the hardware clock of my BIOS has been turned back with one hour.

To fix the situation I’ve used the hwclock – query and set the hardware clock (RTC) command.

It took me a while until I remember how exactly I did it before but after a quick consult with the manul I came up with the right option to Set the Hardware Clock to the current System Time on my Debian Linux.

Here is the command which set the hardware clock to the current system time for me;

debian:~# hwclock --systohc

Cheers 🙂

Share this on:

Download PDFDownload PDF

Tags:

2 Responses to “Set current day time in Linux to BIOS hardware clock”

  1. Ikem says:
    SeaMonkey 2.32 SeaMonkey 2.32 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32

    Do you have a dual boot?

    Because Windows and Linux is handling time differently.

    Windows changes the bios time, Linux doesn't.

     

    View CommentView Comment
    • admin says:
      Google Chrome 40.0.2214.91 Google Chrome 40.0.2214.91 Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36

      Yes if I remember correctly when writting the article I was using dual boot. If it doesn’t work for you the quickest fix is to add

      hwclock –systohc

      to /etc/rc.local before exit 0. So time will be synched auto on boot time.

      Hope this helps,
      Georgi

      View CommentView Comment

Leave a Reply

CommentLuv badge