[time-admin] System clock reverts to GMT at boot

Bug #35423 reported by Melissa Draper
30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Invalid
Medium
Ubuntu Desktop Bugs

Bug Description

Time is currently Sun Mar 18 01:46 PM EST 2006. However the computer clock shows time as being Sat Mar 18 02:50:26 EST 2006.

This is way more than a mere daylight-savings glitch.

I had not rebooted for several days, but yesterday I did so and this behaviour began.

Changing time/date via the applet is not permanent, as it reverts to GMT at reboot. The system acknowledges the correct timezone (for me, Australia/Sydney), however it seems that data for said timezone has been wrongly changed or corrupted. Sychronising with the internet server does not do anything to help.

Tags: time-admin
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. What version of Ubuntu do you use? Could you copy to a comment:
- cat /etc/timezone
- date
before and after running the application?

Do you have ntpdate running at boot?

Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Melissa Draper (melissa) wrote :

root@mantis:~# cat /etc/timezone
Australia/Sydney
root@mantis:~# date
Sun Mar 19 02:26:51 EST 2006
root@mantis:~#

Time according to all other timing devices around me is is currently 13:26 on the same date

Clock preferences dialog shows:
---------------------------------
Clock type: 24 hour

[ ] show seconds
[x] show date
[ ] use UTC
---------------------------------

"before and after running the application?"

What application?

"Do you have ntpdate running at boot?"

How can I tell?

Revision history for this message
Melissa Draper (melissa) wrote :

Also, I dont mean the clock prefs dialog shows in ascii, that's just how I chose to depict.

Revision history for this message
Melissa Draper (melissa) wrote :

I'm on a roll here, i also forgot to mention i'm using Dapper

Revision history for this message
Sebastien Bacher (seb128) wrote :

You wrote "Changing time/date via the applet is not permanent,", I assume you mean times-admin which allow you to change the hour? That's the application I'm speaking about ...

Revision history for this message
Melissa Draper (melissa) wrote :

I'm referring to the applet dialog that you get when you rightclick on the time display on the gnome panel -> Adjust Date & Time

Revision history for this message
Sebastien Bacher (seb128) wrote :

that item runs "times-admin", having the timezone and date after using it would be useful

Revision history for this message
Melissa Draper (melissa) wrote : ntp config file comparison

After changing the time via the above applet, the timezone is still the same as before (Australia/Sydney). Date shows correctly at (currently) Sun Mar 19 21:55:01 EST 2006.

As per ntpdate, I noticed a checkbox in the applet "Periodically synchronise clock with Internet Servers" and checked this. It offered to install and I chose 'yes'. It downloaded packages and during install offered to update ntp.conf .. i havent said 'yes' yet, awaiting your advice.

Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: System clock reverts to GMT at boot

Is your hardware clock set to localtime? This reminds me of bug #23216 (at shutdown the hw clock is set to UTC, instead of localtime).

Revision history for this message
Melissa Draper (melissa) wrote :

Even with ntpdate, I am still stuck at GMT time each time I reboot.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

What is UTC set to in /etc/default/rcS ? What is the contents of your /etc/adjtime ?

Revision history for this message
Melissa Draper (melissa) wrote : rcS.d and adjtime results

See attachment for answer to your above enquiry.

Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: System clock reverts to GMT at boot

Can you please do a:
sudo sh -x /etc/init.d/hwclock.sh stop
and attach the output?

Revision history for this message
Melissa Draper (melissa) wrote : hwclock stop

Output for above command in attached file.

Revision history for this message
Sebastien Bacher (seb128) wrote : Re: System clock reverts to GMT at boot

Sorry to ask some other questions but that bug is confusing. Could you run those after boot:
- sudo hwclock --localtime
- date
- date --utc
- cat /etc/timezone

That's probably a duplicate of the other bug pointed before. Setting the PC clock to UTC and /etc/default/rcS UTC=yes would probably fix the issue

Revision history for this message
Melissa Draper (melissa) wrote :

I haven't rebooted for almost a week, but I rebooted today and the time is fine. It is showing the actual time now.

melissa@mantis:~$ sudo hwclock --localtime
Password:
Wed 29 Mar 2006 04:28:55 EST -0.617787 seconds
melissa@mantis:~$ date
Wed Mar 29 15:29:03 EST 2006
melissa@mantis:~$ date --utc
Wed Mar 29 04:29:05 UTC 2006
melissa@mantis:~$ cat /etc/timezone
Australia/Sydney
melissa@mantis:~$

I did not yet change the /etc/default/rcS UTC option and still reads as follows:
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=no

I have absolutely no idea what has fixed it, but I'll leave the rcS as it is, and comment back here if time goes stupid again.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Just after the latest updates (kernel ...20 and not much more) I again booted up with actual GMT displayed as localtime. Seems like ntpdate was not run either. And probably related, I now had an IP address through dhcp (bug #33968).

The time was maybe set wrongly at shutdown earlier today (after a slew of updates).

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Actually, I don't think the hwclock was set wrongly at shutdown, because the hwclock is currently correct, and it would only be set at shutdown if I understand correctly (and I haven't booted in between).

It might be something broken about the way the system (kernel, initrd, sysvinit) picks up the hw time, and about at what moment the system realizes it is in a particular timezone and that the hw time is not UTC.

Revision history for this message
Alexander van Loon (avanloon) wrote :

I was about to report a bug about the time going haywire as well, but I *think* the problem described in this bugreport is identical to my problem.

Previous releases of Ubuntu didn't have the Ubiquity Live CD installer. Those installers used to ask me a question about whether the time was set to local time or GMT (if I recall correctly). My most recent Ubuntu install was done with a recent Ubuntu Flight of Dapper, with the Ubiquity Live CD installer. The Ubiquity installer does not ask the question.

My timezone is set to Europe/Amsterdam, my time zone is GMT + 02:00 (http://wwp.greenwichmeantime.com/time-zone/europe/european-union/the-netherlands/time.htm). However, my clock is displaying GMT + 04:00. Maybe Ubuntu thinks my time zone is GMT, and adds another 02:00 to it for some reason? That's my suspicion, I have no idea.

My Windows XP install - I have a dual boot - is also affected, and is displaying the incorrect time as well.

Revision history for this message
Alexander van Loon (avanloon) wrote :

Oh, forgot to mention, just like the initial bug reporter, Melissa Draper, it's also pointless for me if I change the time, because the change is not permanent.

Revision history for this message
Alexander van Loon (avanloon) wrote :

Correction, I was wrong because I was affected by bug #37750

Revision history for this message
Peter Whittaker (pwwnow) wrote :

Are you still experiencing this bug?

If so, does the bug continue to appear if you run the command

sudo tzconfig

???

pww

Revision history for this message
Daniel Holbach (dholbach) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in gnome-system-tools:
status: Needs Info → Rejected
Revision history for this message
mukesh agrawal (launchpad-net-mukesh) wrote :

I think I may be seeing the same bug. I think the problem is that the time
control panel does not update the hardware clock after updating the
system clock.

Because the hardware clock is assumed to be in the local timezone,
the system clock gets initialized to the wrong value after the next
reboot.

In my particular case:

1. Clock was set to US Eastern Daylight Time. Suppose the local time was 12pm.
2. I changed the timezone to US Pacific Daylight Time. The local time then shows as 9am.
3. I then reboot. The local time now shows as 12pm.

I think this can be fixed by running hwclock --systohc (as root)
following timezone changes.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Mukesh: please don't reopen such an old bug, but file a new one if needed.

In your case, though, I think there's no bug: Linux sets the hardware clock to UTC time disregarding your time zone. Then, the time that is displayed is adapted depending on the time zone you want. This is necessary e.g. for servers where different users may want different time zones.

When you say:
> I think this can be fixed by running hwclock --systohc (as root)
> following timezone changes.
First, I don't think this will change anything, since it will save UTC time to hardware clock, not local time. And second, "I think" is a weird way of giving information. ;-) Either you've tested it, or it's of no value for debugging, and better not say it!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.