Missing /etc/adjtime resets clock to UTC after reboot

Hello :slight_smile:

I’ve installed openSuse 12.2 x64 on my laptop. During the setup process i unchecked the ‘Set hardware clock to UTC’ option. But now, after finishing the installation i’ve found this bug [Bug 779440] New: /etc/adjtime not created during installation; can’t se](http://lists.opensuse.org/opensuse-bugs/2012-09/msg00918.html) . Due to unchecking of the option (and missing /etc/adjtime), I’m unable to set my hw clock to local time. ‘Set hardware clock to UTC’ gets selected after every restart. While sorting the bug is being worked out, can i manage with copying the /etc/adjtime file from another installation and set things right? If yes, could someone please post the file…

Expecting an easy fix to the problem!

thanks.

Abhishek

On 09/27/2012 02:26 PM, abhitheaviator wrote:
>
> Hello :slight_smile:
>
> I’ve installed openSuse 12.2 x64 on my laptop. During the setup
> process i unchecked the ‘Set hardware clock to UTC’ option. But now,
> after finishing the installation i’ve found this bug ‘[Bug 779440] New:
> /etc/adjtime not created during installation; can’t se’
> (http://lists.opensuse.org/opensuse-bugs/2012-09/msg00918.html) . Due to
> unchecking of the option (and missing /etc/adjtime), I’m unable to set
> my hw clock to local time. ‘Set hardware clock to UTC’ gets selected
> after every restart. While sorting the bug is being worked out, can i
> manage with copying the /etc/adjtime file from another installation and
> set things right? If yes, could someone please post the file…
>
> Expecting an easy fix to the problem!

finger@larrylap:~> cat /etc/adjtime
0.0 0 0.0
0
UTC

Have a look here as well: What is UTC or GMT Time & a possible issue with openSUSE 12.2 and its solution. - Blogs - openSUSE Forums

Thank You,

I am having the same kind of problem as **abhitheaviator. **Using openSUSE 12.2, 64-bit, with KDE desktop environment. Fairly inexperienced user.

When I enter the command:

sudo echo -e "0.0 0 0.0
0
LOCAL" > /etc/adjtime

I get “Permission denied”.

What am I doing wrong?

Am 30.09.2012 02:16, schrieb tb75252:
> When I enter the command:
> Code:
> --------------------
> sudo echo -e “0.0 0 0.0
0
LOCAL” > /etc/adjtime
> --------------------
> I get “Permission denied”.
>
> What am I doing wrong?
>
>
At the moment when the redirect (the >) is performed you have no longer
root rights (sudo ends before that point on your command line).
Try


su -
echo -e "0.0 0 0.0
0
LOCAL" > /etc/adjtime

instead.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.1 | HD 3000
eCAFE 800: oS 12.2 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Give this a try instead:

su -
password:
echo -e "0.0 0 0.0
0
LOCAL" > /etc/adjtime

Thank You,

Thank you, that worked!

Unfortunately, there’s no change in the system clock issue… The BIOS clock still get set 5 hours ahead of local time and that interferes with the time displayed when booting up Windows 7.

If anyone has another suggestion, please speak up!

Let us have a look at the process. First we start YaST:

http://paste.opensuse.org/view/download/42580158

Hardware Clock set to UTC is unchecked. Make sure the correct time zone is checked. Now lets select the Change Button:

http://paste.opensuse.org/view/download/34761120

Here is what I have in Change Date & Time Window. Next I hit the Configure button:

http://paste.opensuse.org/view/download/28874014

I removed the undisciplined local clock after I made sure I could contact the selected Server.

http://paste.opensuse.org/view/download/75879333

Then I pressed OK, Accept and OK again as I remember.

Thank You,

On 2012-09-30 03:06, tb75252 wrote:

> Thank you, that worked!
>
> Unfortunately, there’s no change in the system clock issue… The BIOS
> clock still get set 5 hours ahead of local time and that interferes with
> the time displayed when booting up Windows 7.

After the change, you must make sure that the system time is copied to the cmos clock, and that
after making sure that the system time is correct.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Thank you for the detailed instructions.
Followed all your instructions and made sure that I also set the correct time/date in the BIOS. Unfortunately every time that I boot up openSUSE the CMOS clock gets set to UTC time…

Yes, I made sure that the correct time was set in the BIOS. Unfortunately it does not seem to work and the CMOS time gets reset to UTC every time that I boot up openSUSE.

On 2012-10-02 02:56, tb75252 wrote:
>
> Yes, I made sure that the correct time was set in the BIOS.
> Unfortunately it does not seem to work and the CMOS time gets reset to
> UTC every time that I boot up openSUSE.

Copy here your adjtime file.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

james@LINUXMASTER:~> **cat /etc/adjtime**
0.000000 1348976627 0.000000
1348976627
LOCAL

Here is what I get from terminal when I run **cat /etc/adjtime **and you could do the same. Just copy what you get into a message here using the advanced message editor and place the results in a code # block, which will look (something) like mine above.

Thank You,

Here’s what I get:

cat /etc/adjtime
0.000000 1349137238 0.000000
1349137238
LOCAL

I had trouble with setting the clock myself, but I finally made it:

  1. Create /etc/adjtime with contents:
0.0 0 0.0
0
LOCAL
  1. Edit lines in /etc/sysconfig/clock:
    SYSTOHC=“no”
    TIMEZONE=“Europe/Warsaw” (your timezone)
    DEFAULT_TIMEZONE=“Europe/Warsaw” (your timezone)
  2. Reboot and set hardware clock to your local time through BIOS.
  3. Clock should be set correctly.
  4. Edit line in /etc/sysconfig/clock:
    SYSTOHC=“yes”
  5. Reboot, check clock and your done.

I did per your instructions but the Windows 7 clock is still messed up. It gets set ahead by five hours… The clock in openSUSE is always correct.

Hi,

Suse 12.2 UTC seems buged… For optimal clock setting on win 7, go on :

Yast => Files editor /etc/sysconfig => Environment => Clock

In SYSTOHC chooses “yes” option : in FORCE_SYSTOHC chooses more “yes” option for force suse to synchronize its clock setting with the bios at boot and at close session.

It’s working on my pc :slight_smile:

Good chance and good day to you.

Thanks for your reply. I followed your instructions but unfortunately nothing has changed.
openSUSE resets the BIOS clock to UTC and that messes up the clock in Windows 7.