System clock displays 3 hours less

Hi,

Each time I boot into suse, the system clock displays 3 hours less. (e.g. Now it’s 05:04 and my clock is displaying 02:04)

any idea how to fix it ?

regards,

Is three hourse your local time difference with UTC?
Do you cross boot with Windows?

There’s been quite a bit of discussion about this recently. I had a similar issue myself. Here’s how I dealt with it.

Set the hardware (read BIOS) clock to UTC, do this either by going into BIOS or do this:

From a terminal. as su

“/sbin/hwclock --systohc --utc”

Set your timezone by doing this:

“yast2 timezone &”

tick “Hardware Clock Set to UTC”

Change the time to your local time or synchronise with an NTP server.

I’ve also found the clock on the KDE panel (if you are using KDE) can separately be showing incorrectly, right click clock and select “Digital Clock Settings,”

goto “Timezones”, un-tick all boxes except your local timezone, and change “Clock defaults to:” to your local timezone.

Doing these two things solved all my clock issues.

Of course if you multiboot with Windows that confuses the issue a bit.

If all you use is Linux, you should set bios clock to UTC, it will all work fine that way.

If you multiboot to Windows 7, there is a registry change you can do to also use the BIOS set to UTC so it doesn’t change when you reboot to Linux.
Don’t ask me what it is, you will have to search a MS site for that, I don’t use windows…

If you use XP, there is no way around it, you may have to set the BIOS clock to local time, again I don’t use it so cant help there.

Yes, It’s three hours local time from UTC
I didn’t crosss boot with windows.

I went to yast and unchecked the utc time zone!!

Now works fine !

Thanks you so much !

On 2012-09-29 10:06, agunet74 wrote:
>
> Hi,
>
> Each time I boot into suse, the system clock displays 3 hours less.
> (e.g. Now it’s 05:04 and my clock is displaying 02:04)
>
> any idea how to fix it ?

You did not search the forum to see the half a dozen times this has been asked before, did you? :slight_smile:

Have a look:

View this thread
View this thread
View this thread

Or directly here:
What is UTC or GMT Time & a possible issue with openSUSE 12.2 and its solution.


Cheers / Saludos,

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

Thats not really the correct solution if you only boot Linux on your box.

You really should set your hardware clock to UTC, tick the box to say it is set to UTC, then offset it with your timezone.

That way it will take care of any changes in Daylight saving. This I know because here in NZ we just changed to daylight saving overnight and all my Linux boxes changed automatically, unlike my stupid (company provided) windoz phone !

Well, in my case is the solution… because of this:

In Uruguay (my country) from the first sunday of october to the sencond sunday of march we (Iand when I say say we I mean the whole country) add 1 to official hour. As we are in the line to the atlantic ocean, there is no place, or city to change the utc location. I can check it from march to october but in the spring, summer and part of fall I have to unckeck it.

hope I be clear.

cheers

Agunet

On 2012-09-30 00:16, agunet74 wrote:
>
> Well, in my case is the solution… because of this:
>
> In Uruguay (my country) from the first sunday of october to the sencond
> sunday of march we (Iand when I say say we I mean the whole country) add
> 1 to official hour. As we are in the line to the atlantic ocean, there
> is no place, or city to change the utc location. I can check it from
> march to october but in the spring, summer and part of fall I have to
> unckeck it.
>
> hope I be clear.

No, you aren’t… in almost every country we do the same: the clock is advanced one hour in
summer, and back in winter. Linux knows how to handle that in the different shifts for each
different country in the entire world, you do not have to do it yourself.

For this to work correctly, the cmos clock (not the system clock) must run in UTC time.


Cheers / Saludos,

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

Still as I said before, set your BIOS clock to UTC, tick “Hardware Clock Set to UTC”, set your timezone, Uraguay is in there under the section Central and South America.

Once that is done you’ll never have to adjust it again.

I can do that now, but on October, the 7th the country hour changes and I had no time zone for that.

That again is not completly true.

It is true that the system, when set to the correct time zone (for the system, which serves as a defaulot for the user, each user can set his own time zone), the correct time will be shown regardless of summer/winter time (or daylight saving time). That is, there can be problems when governments decide in the last moment that these things change in their country, because then the time database has to be updated. These updates allways are in the Update repo as a recommended.

It isnot true that the checkbox UTC/Local has anything to do with this. At shutdown the hardware clock is set at the system time. At boot the system time is read back from the hardware clock. As these hardware clocks are not that precise, system time is then asap corrected using NTP (when you have that on and configured of course). As long as the system knows it should store either UTC or Local and uses the same knowledge at retrieving, everything is OK.

But, when you cross boot with a Windows system, Windows thinks that what it restored as boot is allways Local and it stores Local at shutdown (it seems that newer Windows versions can be set to use UTC for this however). That means that when you crossboot from LInux which such a system, one of those better adapts to the other. That is what the checkbox is for.

Thus, when not cross booting, set it at good old Unix/Linux UTC. And when cross booting which a not adaptable (or nowadays not adapted) Windows, set at at Local. Both should work with Linux even when you do not crossboot.

A bug in 12.2 seems to be that configuring using YaST, seems not to store the wanted value in the correct place. Thus do this manualy and the howto is in jmcdaniel3’s blog.

And to our friend from Uruguay. When I go to YaST > System > Date and time and I choose Central and South America at left, I then find Uruguay in the right choice list. Is it not like that with your system? That should make your system showing the correct time (check that on the same page before you) for years to go on. Even if the Uruguyan governement changes it’s somer/winter policy (well, wen they anounce that timely enough for an update to the database to be made and distributed; ).

On 2012-09-30 17:46, agunet74 wrote:
>
> I can do that now, but on October, the 7th the country hour changes and
> I had no time zone for that.

What about the Uruguay time zone? If it is not there, have you reported the bug?


Cheers / Saludos,

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

Well, at this time I set the hour and checked the box “Hardware clock set to UTC” . Let’s see what wil happen on the 7th of october when I change my local time to summer time (1+)

Carlos: Uruguay is in the list.

Thanks Hank for our post, explaining all.

bye

You are welcome. It would be amazing when it wouldn’t work for Uruguay were it works for so many countries since before Linux.

I still remember the faces of the IBM mainframe people at my work, staring in disbelief when we, Unix people, told them we were not coming back at night to stop our systems for an hour to adapt at summer/winter time changing.
“Does Unix change it’s clock automaticalt”? they asked.
“No” we said. Unix allways runs at UTC, it does not change the clock.
“Thus you do not see the local time when you work on a terminal”? they asked.
“No”, we said, “Everybody sees time displayed in his/her own local time. Those loging in from Timbuktu see Timbuktu time, those login in from Uruguay see Uruguay time and we loging in from here see Middle European time. And that is all including Summer time adaption”.

They never realy understood, it being apparently beyond understanding for IBM mainframe people, not enhanced by their MicroSoft ecperience. :frowning:

And this repeated itself two times a year rotfl!

On 2012-10-02 12:26, hcvv wrote:
> And this repeated itself two times a year rotfl!

:slight_smile:

There is a snag, though: cron runs on local time.


Cheers / Saludos,

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

Who’s local time?

On 2012-10-02 14:16, hcvv wrote:

>> There is a snag, though: cron runs on local time.
>>

> Who’s local time?

I assume that the user that runs that cron; ie, root’s for system and root’s entries, and the
respective users for the user crontab files.


Cheers / Saludos,

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

Thus you say that the times a cron run is started is the time as experienced by the respective users when they enter the entries in their respective crontabs.
Isn’t that what the user would expect?
What is the snag?