# clock

## dentoo

suddenly my computer clock (dell d400) goes crazy it's change itself, not only the Linux time is getting changed but also the bios time is being changed.

the OS and the bios time are not the same after they getting changed.

any ideas?

```

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as

# Greenwich Mean Time).  If your 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".

CLOCK="UTC"

# If you wish to pass any other arguments to hwclock during bootup,

# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time

# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="no"

### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".

SRM="no"

# If your alpha uses the ARC console, set this to "yes".

ARC="no"

```

----------

## René1983

Do you have a dual boot system with Windows?

And when exactly does it happen and the what exactly happens. Please a bit more details!

----------

## dentoo

 *René1983 wrote:*   

> Do you have a dual boot system with Windows?
> 
> And when exactly does it happen and the what exactly happens. Please a bit more details!

 

no windows.

I wish I knew when it happend.

----------

## René1983

Does it change to a standard time or is it a random time?

----------

## dentoo

 *René1983 wrote:*   

> Does it change to a standard time or is it a random time?

 

well I rebooted now.

the time in new york is

17:45

the time in the OS is

14:45

the time in the bios is

18:45

well I rebooted twice

first only the OS has changed, the bios was ok

and then I rebooted again and I saw that the bios changed

----------

## DrSnoegler

 :Confused: 

which time did you get if you try

```
rdate time.ethz.ch
```

?

I have also a problem with one machine that returns a wrong time from the ntp-server.

I can't understand why one returns a wrong time and another one the right time although they have the same configuration:

/etc/rc.conf

/etc/conf.d/clock

...

----------

## dentoo

 *DrSnoegler wrote:*   

> 
> 
> which time did you get if you try
> 
> ```
> ...

 

```
rdate: [time.ethz.ch]   Sun Oct 22 19:37:50 2006
```

thats good, but my OS says 16:24

----------

## René1983

I do have a simular problem on one of my machines. I created a cron-job that synchronizes the time of the machine every minute with one of the timeservers. It isnt a nice solution, but for me it's ok!

----------

## DrSnoegler

 *Quote:*   

> thats good, but my OS says 16:24

 

try 

```
rdate -s time.ethz.ch
```

 (or another timeserver) as root to synch your os.

 *Quote:*   

>  I created a cron-job that synchronizes the time of the machine every minute with one of the timeservers.

 

that doesn't work for me, because one machine returns a wrong time when i try to get time form a timeserver:

```
$ rdate time.ethz.ch

rdate: [time.ethz.ch]   Tue Oct 24 17:10:41 2006
```

but it's now 19:10 in switzerland... ???

----------

## yngwin

Wouldn't that be UTC on the timeserver and Switzerland being on UTC+2 now?

----------

## DrSnoegler

oh yes, now I've found the problem:

/usr/share/zoneinfo/Europe/Zurich looks like /etc/group   :Rolling Eyes:  don't ask why   :Very Happy: 

```
cp /usr/share/zoneinfo/Europe/Berlin /usr/share/zoneinfo/Europe/Zurich
```

does it for me

thanks

----------

## dentoo

 *DrSnoegler wrote:*   

> oh yes, now I've found the problem:
> 
> /usr/share/zoneinfo/Europe/Zurich looks like /etc/group   don't ask why  
> 
> ```
> ...

 

but not for me, any other ideas??

----------

## DrSnoegler

have you already tried

```
rdate -s time.ethz.ch
```

?

have you set 

```
/etc/localtime
```

 ?

----------

## dentoo

 *DrSnoegler wrote:*   

> have you already tried
> 
> ```
> rdate -s time.ethz.ch
> ```
> ...

 

well,

[/code]rdate -s time.ethz.ch

```

 it's working but it's good until the next time that I rebooting.

and I also need to change my bios every time.
```

[/quote]

and yea I set my localtime.

----------

## DrSnoegler

try to set in /etc/conf.d/clock:

```
# If you want to set the Hardware Clock to the current System Time

# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="yes"

```

update your time with rdate and reboot.

I hope this works for you.

----------

## 01mf02

If that still doesn't work, you could try to replace the battery on the mainboard that usually keeps the date - maybe it's empty?

----------

## dentoo

 *01mf02 wrote:*   

> If that still doesn't work, you could try to replace the battery on the mainboard that usually keeps the date - maybe it's empty?

 

It's a lap top and I replaced the main voard last year.

I change my

/etc/conf.d/clock

to 

```
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as

# Greenwich Mean Time).  If your 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".

CLOCK="local"

# If you wish to pass any other arguments to hwclock during bootup,

# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time

# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="yes"

### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".

SRM="no"

# If your alpha uses the ARC console, set this to "yes".

ARC="no"

```

and now my bios is ok but the system still change his time.

----------

