[SOLVED] How to synchronize time between windows and linux
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Windows thinks the rtc clock (BIOS clock) is set in localtime. So in Windows/BIOS set it to localtime. And in linux while installing set the option that rtc clock is in localtime time and not utc. Howto set after installing linux varies with distro.
I will just furnish the details. I am new to windows 7 and it is kept only for my siblings. So I prefer not to edit it in windows. I have never faced a problem with time in linux before.
Following are some of the outputs that might help.
# hwclock --localtime
Sun 11 Jan 2015 01:08:56 PM IST -0.172292 seconds
# hwclock --utc
Sun 11 Jan 2015 06:39:47 PM IST -0.984969 seconds
Now the time in the panel shows 06:39 p.m. (this is what is show by hwclock --utc) while the real time over here is 01:08:56 PM (i.e. the time shown by hwclock --localtime).
So, I want to set the system time to local time and how should I do that.
As you can see in the configuration file in the directory /etc/conf.d/, the comment in the file recommends that you edit the file to make CLOCK/clock="local" if you dual boot with Windows. This appears to make sense, given that Windows' clock (the hardware clock) contains local time, so when you boot Linux it will copy the time in the hardware clock to the system clock, find that CLOCK/clock="local" and therefore not make any adjustment to the time in the system clock.
I have already made that attempt with no luck. Have a look at the following file:
# cat /etc/conf.d/hwclock
# Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as
# Greenwich Mean Time). If that clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".
# If you want the hwclock script to set the system time (software clock)
# to match the current hardware clock during bootup, leave this
# commented out.
# However, you can set this to "NO" ifyou are running a modern kernel
# with CONFIG_RTC_HCTOSYS set to y and your hardware clock set to UTC.
# If you do not want to set the hardware clock to the current system
# time (software clock) during shutdown, set this to no.
# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here. Alpha users may wish to use --arc or --srm here.