LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Time clash: WIndows - Linux (https://www.linuxquestions.org/questions/linux-newbie-8/time-clash-windows-linux-760281/)

AceCraft 10-07-2009 06:29 AM

Time clash: WIndows - Linux
 
hi!

Just recently I've installed dual-boot Fedora v.11 (2.6.30.8-64.fc11.i586) with previously installed WIndows on other partition. I think I've set up somewhere in installation setting to delay system time by 2 hours. The effect is that when I set up the correct time on windows I get wrong time (delayed by 2 h) on Linux and vice versa. I've no idea what should I change to get rid of that problem.

Can anybody help me?

With best regards,
AceCraft.

sadiqdm 10-07-2009 09:45 AM

This sounds like you selected UTC on the time zone page. I think you can change this in the Time & Date settings. I don't have Fedora box to look at here.

If I understand it correctly, this setting effects how the time is saved to the hardware clock when shutting down, and retrieved on restart. Since Windows does things differently, you need to have selected "Use local time" and not "UTC" for this setting, so the clocks are the same. You should also enable Internet time setting so that your clock is updated by a time server whenever you boot up.

What time zone are you in? When your local time is 12:00, what times would you get in Linux, and in Windows?

AceCraft 10-07-2009 01:59 PM

Thanks, that gives me an outlook what's going on.

Quote:

What time zone are you in? When your local time is 12:00, what times would you get in Linux, and in Windows?
In windows time is normal - it's 12:00, in fedora it's 14:00.
Trying to find this solution about UTC.Meaby I can change it in bios.

... ok found something here
http://www.linuxsa.org.au/tips/time.html
http://linux.derkeiler.com/Mailing-L...5-11/0205.html
http://docs.fedoraproject.org/fedora...c4/sn-utc.html

but setting /etc/sysconfig/clock doesn't seem to change anything. (Still the same) Oh btw: I've just discovered that using date -u command (print time according to UTC) gives in fact RIGHT time. (ok, forget about that - with hwclock it works with --localtime parameter)

For now I've wrote a command:
Code:

su -c "date `date -u +%m%d%H%M`"
that sets time according to UTC. Wonder if it'll have effect on windows too?

Edit: yes unfortunately it does... So if i'll do this command it still changes system time two hours back.
Yea, it seems to be a bug that /etc/sysconfig/clock UTC=false doesn't work. It's described in documentation though

DavidMcCann 10-07-2009 05:15 PM

Enter the Systems menu and choose Administration, then Date & Time. Then you can turn off UTC by just un-ticking a box. The trouble with some internet help sites is that they're produced by professionals whose instinct is to mess with configuration files at every opportunity!

AceCraft 10-08-2009 02:46 PM

oh, so here they've hidden this pesky button. x(

Thank you for help.
I was just going the hard way instead use user-fiendly GUI.

lutusp 10-08-2009 03:08 PM

Quote:

Originally Posted by AceCraft (Post 3710828)
hi!

Just recently I've installed dual-boot Fedora v.11 (2.6.30.8-64.fc11.i586) with previously installed WIndows on other partition. I think I've set up somewhere in installation setting to delay system time by 2 hours. The effect is that when I set up the correct time on windows I get wrong time (delayed by 2 h) on Linux and vice versa. I've no idea what should I change to get rid of that problem.

Can anybody help me?

With best regards,
AceCraft.

Basically, Linux defaults to UTC for the system clock and converts UTC into local time for users. Windows very stupidly defaults to local time on the system clock (a nightmare for travelers). So when you switch from Windows to Linux, the clock is suddenly wrong by the difference between your time zone and UTC.

The problem is obviously Windows, and we all have to make accommodations for Windows until it gasps its last breath (hopefully soon). In the meantime, put this line at the end of /etc/rc.local in your Linux installation:

Code:

ntpd -qg
This will only work if you already have a network connection when /etc/rc.local runs, which will probably be true. The command above takes some time to execute, and this delay will serve to remind you of the price we all pay to have anything to do with Windows.

deltabrown 10-09-2009 02:35 PM

Check for a file: "/etc/localtime". Should be about 2 to 3 kB or a link to something like /usr/share/zoneinfo/US/Pacific. Maybe it wasn't setup properly during the install.


All times are GMT -5. The time now is 02:26 AM.