You are not logged in.

#1 2012-08-01 12:51:11

yotama9
Member
Registered: 2010-10-06
Posts: 70

Can't set time and it keep changing.

First, I hope the title is clear and I'll accept attempts to create a more clear title.

I have a lenovo  machine that dual boot with windows 7. I hardly ever boot into windows but I had to login into the windows environment about a month ago. Ever since that log in, the system clock is wrong. I tried to fixed it through the gnome-control-center but no mater what I do, nothing stick. I'm not only speaking about the current hour. I can't set it to use network time and my computer insist I'm using London time while I am using Jerusalem time. I tried all sorts of things and nothing works, I suspect I have broken something and I don't know what. I tried the arch wiki page both about ntpd and hwclock but none of them work. I think I would better off going back to default configuration of the clock and stepping up from those again.

Note, that when I had to log into windows, I also have also installed kde and e17 to see how have the developed.

Thank you for any help.

Offline

#2 2012-08-01 15:47:27

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Can't set time and it keep changing.

what is your clock set to? UTC or localtime?
If you dualboot with Windows, it is recommended to use localtime (although Windows can use utc now too)
you can then use hwclock & the date commands to set your correct time. Also read this :: https://wiki.archlinux.org/index.php/Time


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2012-08-01 20:22:49

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

I don't know if my clock is set to UTC or local. Here is what happen when I do hwclock:



[yotam@myhost ~]$ sudo hwclock --set --date="2012-08-01 23:21:30"
Password: 
[yotam@myhost ~]$ date
Thu Aug  2 00:46:15 IDT 2012

Needless to say, this is the wrong time

Offline

#4 2012-08-01 23:12:04

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Can't set time and it keep changing.

Isn't there a section in rc.conf for setting that? I have

LOCALE="en_CA.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

and I run "ntpdate pool.ntp.org" to get my system time right.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#5 2012-08-02 03:47:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,727

Re: Can't set time and it keep changing.

yotama9 wrote:

I don't know if my clock is set to UTC or local. Here is what happen when I do hwclock:

Please post the output of hwclock --debug


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#6 2012-08-02 04:24:14

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: Can't set time and it keep changing.

I've had this problem. It happens when the clock is set to localtime on one (probably WIndows) and UTC on the other. I fixed my problem by changing some value in regedit to turn on UTC for windows.

Offline

#7 2012-08-02 08:17:30

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

ConnorBehan wrote:

Isn't there a section in rc.conf for setting that? I have

LOCALE="en_CA.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

and I run "ntpdate pool.ntp.org" to get my system time right.


Here is what I have:

LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Asia/Jerusalem"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

And this is located in /etc/rc.conf

Last edited by yotama9 (2012-08-02 08:18:23)

Offline

#8 2012-08-02 08:19:21

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

Hspasta wrote:

I've had this problem. It happens when the clock is set to localtime on one (probably WIndows) and UTC on the other. I fixed my problem by changing some value in regedit to turn on UTC for windows.


1. I don't use windows that often
2. I can't update the clock time at all through Arch. It's not that I update the clock and it drift away, I can't even set the time.

Offline

#9 2012-08-02 09:54:24

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Can't set time and it keep changing.

yotama wrote:

......I can't even set the time.

You've said that before without explaining why. Do you get errors? and if so, what are those? Also please provide outputs when someone asks because that's the only way someone can help.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2012-08-02 10:48:41

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

Inxsible wrote:

You've said that before without explaining why. Do you get errors? and if so, what are those? Also please provide outputs when someone asks because that's the only way someone can help.

It's just that ... nothing happens. My second message is an example to that. I type in the command, everything seems all right but the time remains the same. If I had an error message, I would have post it.

Offline

#11 2012-08-02 11:20:04

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,681

Re: Can't set time and it keep changing.

yotama9 wrote:
Inxsible wrote:

You've said that before without explaining why. Do you get errors? and if so, what are those? Also please provide outputs when someone asks because that's the only way someone can help.

It's just that ... nothing happens. My second message is an example to that. I type in the command, everything seems all right but the time remains the same. If I had an error message, I would have post it.

More would probably happen if you added the --hctosys flag when you invoke hwclock

Offline

#12 2012-08-02 11:24:34

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

skunktrader wrote:

More would probably happen if you added the --hctosys flag when you invoke hwclock

This is what I was missing. I'll keep my eye open to check if the time is getting wrong. Thanks, for now.

Offline

#13 2012-08-02 11:30:32

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Can't set time and it keep changing.

Further check should be taken as systemd is involved.
In particular if you're having another OS alongside


do it good first, it will be faster than do it twice the saint wink

Offline

#14 2012-08-02 11:32:43

Mecin
Member
Registered: 2012-08-01
Posts: 1

Re: Can't set time and it keep changing.

wiki wrote:

The overall look of the rc.conf file has recently (July 2012) changed. This setting is now configured in /etc/adjtime.

My /etc/adjtime:

0.000000 1343771404 0.000000
1343771404
LOCAL

Change LOCAL to UTC if u want and remove all entries from rc.conf. All information u can find on wiki.

Offline

#15 2012-08-02 19:08:42

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

Well, the clock still drift away. I have changed the adjtime file to use UTC and I'll check if the hour still drift.

Offline

#16 2012-08-07 08:16:55

yotama9
Member
Registered: 2010-10-06
Posts: 70

Re: Can't set time and it keep changing.

For several days, the clock was fine. Yesterday, I unplugged the screen from my laptop and shut the lid. I did this too quickly and the machine didn't hibernate.   When I have open the lid, the date was set back to 8.2.2012 and the hour was wrong. Also, /etc/adjtime had changed to local instead of UTC. I have set the date manually and switched /etc/adjtime to be UTC without any effect.

Offline

#17 2012-08-31 10:05:56

darkmav
Member
Registered: 2012-01-21
Posts: 127

Re: Can't set time and it keep changing.

I am running Arch Linux on a Dell XPS15 laptop, dual booting it with Windows 7.

The BIOS and Windows 7 display the correct time, but on every bootup, Arch displays the wrong time. I have tried applying the Windows 7 registry fix, but it only messes up the time Windows 7 displays. I am in the "Asia/Kolkata" (Indian Standard Time) zone. Here is the output of hwclock --debug

[root@krypton Documents]# hwclock --debug
hwclock from util-linux 2.21.2
Using /dev interface to clock.
Last drift adjustment done at 1345565637 seconds after 1969
Last calibration done at 1345565637 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2012/08/31 15:31:46
Hw clock time : 2012/08/31 15:31:46 = 1346427106 seconds since 1969
Fri 31 Aug 2012 09:01:46 PM IST  -0.141722 seconds
[root@krypton Documents]#

The time read from the Hardware Clock is correct. The system time is wrong.

[root@krypton Documents]# ntpdate pool.ntp.org
31 Aug 21:02:04 ntpdate[1473]: no server suitable for synchronization found

What is the solution to this?

Last edited by darkmav (2012-08-31 10:07:50)

Offline

#18 2012-08-31 18:04:35

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Can't set time and it keep changing.

Have you read the wiki page on Time ? What steps have you followed in order to fix the issue?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#19 2012-09-01 05:01:09

darkmav
Member
Registered: 2012-01-21
Posts: 127

Re: Can't set time and it keep changing.

Inxsible wrote:

Have you read the wiki page on Time ? What steps have you followed in order to fix the issue?

The time wiki did not exactly help, as the Windows registry fix does not work for me. I then went through the systemd wiki (https://wiki.archlinux.org/index.php/Sy … clock_time) and modified /etc/adjtime to use localtime, as illustrated in the wiki. Now, at least the time in Arch is the same as the time in the BIOS (and also the same as the time in Windows). I am still going through the whole wiki to figure out why the UTC-based solution did not work for me...

Offline

#20 2012-09-01 06:15:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Can't set time and it keep changing.

Did you also stop windows from *updating* the clock.  Windows has its own ntp server, and you have to stop it from doing its thing.  Probably in the control panel's clock or time or whatever it calls it.  There is also a Window's Time service that you can stop, though I don't know that this is necessary.

Offline

#21 2012-09-03 00:44:36

darkmav
Member
Registered: 2012-01-21
Posts: 127

Re: Can't set time and it keep changing.

While I managed to get localtime to work, I still get SSL certificate issuing errors from pacman, yaourt every time I try to install something. I tried ntp, but ntpd -qg just hangs.The system time is correct. Any ideas on how to fix this problem?

Offline

#22 2012-09-03 06:22:13

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Can't set time and it keep changing.

And how exactly are pacman SSL certificate errors related to setting time?

Delete (or move) /etc/pacman.conf and read: https://wiki.archlinux.org/index.php/Pa … tall_it.3F


But you should probably start a new thread instead of hijacking this one.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#23 2012-09-03 06:29:06

darkmav
Member
Registered: 2012-01-21
Posts: 127

Re: Can't set time and it keep changing.

DSpider wrote:

And how exactly are pacman SSL certificate errors related to setting time?

Delete (or move) /etc/pacman.conf and read: https://wiki.archlinux.org/index.php/Pa … tall_it.3F


But you should probably start a new thread instead of hijacking this one.

Thanks for your concise reply DSpider. I read somewhere that the SSL certificate errors are because the system time is not synced properly with the network time host. The errors cropped up only after the first reboot on the Arch installation, and did not show up at all during the manual package installation at the time Arch was being set up. I thought that the problems are all connected in view of what I read on the forums, but if they are indeed disconnected, then I apologize for this post and will not post hereafter on this thread about the SSL certificate errors.

PS - I do not intend to hijack the thread, please be assured. I am new to Arch and am just getting used to all the error messages, and find people on this forum generally very helpful, so I can also assure you that being familiar with netiquette, I do not intend to misuse the forums either.

Offline

Board footer

Powered by FluxBB