Trouble with date and time

8 respostas [Última entrada]
kopolee11
Desconectado
Joined: 06/05/2013

Hello all,

I've been using Trisquel Mini 6.0 on my Asus Eee 1050HA PC (H-node link: http://ur1.ca/e72tf) for about two weeks so far. Everything is running very well for the most part. However, for some reason, the date and time on the netbook is usually very inaccurate, sometimes by a few hours, other times by several years. (As in, 2002)

I've looked into the BIOS itself - which unfortunately does not run coreboot - and I've manually changed the date and time myself, and then saved it. However, after shutting down my computer for any significant amount of time, the process will be restarted. I've also tried to look through the BIOS, to make sure it's using UTC time, but I am unable to find where this setting is.

And even when I do fix the date and time in the BIOS and boot into Trisquel, it does not always fix the date and time within Trisquel. And unfortunately I don't seem to know where the date and time setting menu is under Trisquel Mini.

Anyway, I appreciate any help that is provided. If you need me to provide more information and output of command line prompts, I'd be happy to do so. Thank you very much.

Michał Masłowski

I am a member!

I am a translator!

Desconectado
Joined: 05/15/2010

I know two reasons for hardware time being inaccurate:
- bad battery
- NTP running and system time not being synced to the realtime clock

Run "hwclock --systohc" as root to fix the second issue.
/proc/driver/rtc has a batt_status line that might show if the first
issue occurs. None of my systems have RTC battery problems, most using
Parabola had system clock not synchronized to hardware.

I think BIOSes have no UTC time setting, the time specified is in UTC
and operating systems have settings for UTC or local time. UTC is
probably default here, Windows (at least old versions) used local time.
The time in /proc/driver/rtc and BIOS should be UTC if UTC is used. I
don't believe timezone differences could make a multiyear error.

If you use NTP and always have network access, the real time clock isn't
needed.

kopolee11
Desconectado
Joined: 06/05/2013

On Wed, 05 Jun 2013 19:51:37 +0200
name at domain (Michał Masłowski) wrote:

> I know two reasons for hardware time being inaccurate:
> - bad battery
> - NTP running and system time not being synced to the realtime clock
>
> Run "hwclock --systohc" as root to fix the second issue.

I ran "sudo hwclock -systohc", and didn't notice any immediate change. I then restarted the computer, and the date and time were completely accurate. (Both in BIOS and in Trisquel). However, this does not necessarily mean the issue has been solved, as this usually happens. I'll have to see if the date and time remains accurate after an extended shutdown, which will probably take a few days.

> /proc/driver/rtc has a batt_status line that might show if the first
> issue occurs.

I checked the /proc/driver/rtc file, and saw this: "batt_status : okay" So I'm pretty sure it's not a bad battery, although it certainly could be.

> I think BIOSes have no UTC time setting, the time specified is in UTC
> and operating systems have settings for UTC or local time. UTC is
> probably default here, Windows (at least old versions) used local time.

Okay, wasn't sure of that. I should note that this computer originally had a Windows XP installation, but I've since overwritten it with a Trisquel installation. Not sure if XP uses local time or UTC, and if that would have any effect on this problem.

> If you use NTP and always have network access, the real time clock isn't
> needed.

That's what I assumed, but I'm not actually sure if I have NTP set up properly. Any way to make sure in Trisquel Mini?

Thanks for your help!

--
Michael Mehrazar <name at domain>

lembas
Desconectado
Joined: 05/13/2010
kopolee11
Desconectado
Joined: 06/05/2013

On Wed, 5 Jun 2013 21:16:38 +0200 (CEST)
name at domain wrote:

> https://en.wikipedia.org/wiki/Nonvolatile_BIOS_memory#CMOS_battery

Thanks, that's very interesting. I wasn't aware of how closely tied the BIOS was to the battery. And I certainly didn't know about the existence of lithium coin cells. I would imagine that means I might have to replace the battery, or at least the coin cell.

Is there a way to avoid that? For example, can I have the system's time sync with time servers once I've gotten online?

lembas
Desconectado
Joined: 05/13/2010

Not sure about that, good question.

I've had such time lag issues a few times and they were always cured with a new BIOS battery. However those were desktop machines so that wasn't much of a hassle. I guess some laptops aren't as impossible as others though...

kopolee11
Desconectado
Joined: 06/05/2013

Just an update. I still seem to have an issue with the BIOS resetting to 2002 whenever I boot up after an extended period. However, that is pretty easy to fix, I merely check and change the date and time every time I boot in. (Not ideal, but not too big a hassle.)

I also downloaded a program from the "Add/Remove Application" called "Time and Date". Surprisingly, it doesn't seem this program is installed by default in a Trisquel Mini environment. Anyways, through that program I was able to download a NTP. And so far, this seems to have done the trick, although I'll need to test it for a little longer to make sure.

Anyways, thank you all for your help. I hope this information can help out anyone else with this problem.

andrew
Desconectado
Joined: 04/19/2012

On 07/06/13 11:29, Michael Mehrazar wrote:
> Just an update. I still seem to have an issue with the BIOS
> resetting to 2002 whenever I boot up after an extended period.
> However, that is pretty easy to fix, I merely check and change the
> date and time every time I boot in. (Not ideal, but not too big a
> hassle.)

How old is your computer? It sounds like you may need to change the
battery which keeps the time in your BIOS.

Andrew.

kopolee11
Desconectado
Joined: 06/05/2013

The computer was originally purchased in 2009, however I obtained it secondhand in sub-optimal condition about 8 months ago.

I'm fairly certain now the issue is probably with the battery. However, for now I can live with manually changing the BIOS and relying on NTP.

Thanks for the advice.