Clock issue. 1 hour difference (SOLVED)

Booting, installing, newbie
Post Reply
Message
Author
fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

Clock issue. 1 hour difference (SOLVED)

#1 Post by fernan »

Running puppy 5.25

After I set everything , checked BIOS clock through motherboard bios, but every time I reboot, the hour is 1 hour more than the local time.

It happened after a "pfix=clean" boot.

It happened to my mother's notebook also, but I just gave up in that.

I've seen this same problem as "solved" here in the forum, but it wasn't a solution in my case.

Can I just delete some file, and re-create my custom settings? Where this setting are stored? Perhaps I can check if the right value is stored.

I'm not new to puppy, I'm running puppy since version 2.10

Thanks in advance.

Fernan
Last edited by fernan on Sat 06 Aug 2011, 13:18, edited 1 time in total.

wildirish
Posts: 36
Joined: Fri 18 Aug 2006, 05:11

#2 Post by wildirish »

I had the same problem with Lucid Puppy 5.1, except the difference was far more than just an hour, and completely random. Like, I'd start Windows or Puppy v.2, and the clock could be off by 6 hours or 9...you get the idea. I also had problems with shutdown.

I have no idea how it happened, but all of a sudden, Lucid doesn't do that anymore. IIRC, the only thing I did differently was to reboot into Puppy v.2 instead of trying to do a full shutdown. Now, my clock's okay, and no more shutdown problems.

I hope somebody here can give more concrete advice...I'm new at all this.....

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Time is [my] relative :oops:
http://tmxxine.com/m/index.php/Links

. . . meanwhile in Lucid
try clicking bottom right on the time
and selecting synch . . .

useful? Hope so 8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#4 Post by fernan »

Interestin link !!

But the problem is still here... I've changed the time using every tool available, and the result is always the same: Time is set, but when I reboot, 1 hour more.

What I can see is that the timezone is back to UTC everytime, even if change it to "-3" (buenos Aires)

But it was OK before that "pfix=clean"

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#5 Post by nooby »

I know this has gone on for years. At least three years.

Some say it is solved and some say it is us users that get the Devs intentions wrong and others maybe feel unsure what intention the Dev had setting up the script.

So my naive conclusion is that one have to experiment until one get it right by accident or pure luck or by smartness or by logical consistent grasp of what goes wrong.


I have none of the above so I used brute force testing some 20 or so Puppies until my computer always show the right time but I have no idea what cured it or how to get it right if it get wrong again.


One wild suggestion would be to start by deciding on what the cmos clock that the BIOS has access to should be. Should one use GMT or local time and what if the local time is DST due to summer or winter?

Logically GMT or UTC would be cool to use. One can go here to find out?
UTC is also known as Universal Coordinated Time
Current Time Friday, 5 August 2011, 13:46:10
Posted: Today, at 3:32 pm so the Forum clock is very different from UTC.
http://www.timeanddate.com/worldclock/city.html?n=1440
There are other similar that knows times in UTC or GMT or your local town time.

Then set up the BIOS CMOS Clock as utc and then answer the logical question as the Dev has set up that version of Puppy by clicking on the Clock and changing it if needed :)
I use Google Search on Puppy Forum
not an ideal solution though

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#6 Post by fernan »

I was looking to the config file where this info is stored, but no success on that. I wanted to manually edit that file ...

By now, I've set the hardware clock to Local time, and told to Puppy that it's UTC tme, and set my timezone to UTC instead of changing it, so Time is shown properly, but I don't know how it will affect other apps like e-mails and saved documents... Perhaps they are saved as UTC time, and shown incorrectly in other computers....

Iĺl try a "ram" boot, and try to copy settings to my current puppy install

Bruce B

#7 Post by Bruce B »

wildirish wrote:I hope somebody here can give more concrete advice...I'm new at all this.....
I figured it out. I got my system working perfectly on three clocks: (1) RTC, (2) system clock, (3) time servers.

Linux boots using RTC time and uses it for system time. RTC time is UTC unless told differently.

It could work perfect out of the box for our friends in England.

Before Linux, I used Microsoft and it worked out swell with no modifications because I'm in the same time zone as Bill and Steve.

Puppy, I think ships at a default offset of Perth time, which displays the same offset as Bill Gates time.

Now things start getting complicated. Maybe one of these days, I'll make an article on the web and post a lengthy step-by-step on going through all involved between booting with local RTC on the presumption that it is UTC, at what point we export the TZ variable and contact the time servers and what files to modify.

Simply stated, it worked best if I did all the work before the login. This meant establishing a network connection before the login to contact the time servers and export the TZ variable.

This involves an explanation which is very detailed and requires a person modify scripts.

I suppose a person could make a patch kind of thing for one Puppy version. But considering that Puppy changes the scripts between versions and none know the future, I think the best thing to do is a detailed explanation sufficient to work backward and hopefully forward in Puppy versions.

~

Bruce B

#8 Post by Bruce B »

Watch the effects of the export TZ command below

By changing the TZ, I change the time relative to the previous change

The system time changed only in the one shell, it didn't actually change at all, the change is an offset change only

The other shells still run on the same time. The RTC hasn't changed.

[~] date
Fri Aug 5 07:42:17 PDT 2011
[~] export TZ=UTC+2
[~] date
Fri Aug 5 05:42:37 UTC 2011
[~] export TZ=GMT-9
[~] date
Fri Aug 5 16:43:03 GMT 2011
[~] export TZ=UTC
[~] date
Fri Aug 5 07:43:29 UTC 2011
[~]

This is one reason why I found it worked great to sync with the time server, reset the RTC and export the TZ before the first Bash shell, which starts X runs.

Bruce B

#9 Post by Bruce B »

fernan,

It doesn't get complex until you introduce the third clock, the time server.

With just two clocks and a TZ, it should be easy to fix. I think I can give you a way to gain control.

Bruce

~

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#10 Post by fernan »

I never used or sync to a time server, I'm just using my hardware clock as Local Time, and configured Puppy according to that, telling Puppy that my hardware clock is Local Time, and that I'm in the -3 GMT.

It worked fine since frugal install until I did that "pfix=clean" bootup.

Now, I change the timezone settings to "-3", the clock changes, it shows the right time. I go to the "timezone" setting again to check, and it's changed to "UTC" instead of the "-3" I just set up.

When I reboot, clock time is wrong again. I go to "timezome" setting, and it's again set to "UTC".

It seems that when I change it to "-3" , it's not saved.

Goin to BIOS SETUP, before puppy boots, and the clock is OK, local time, it never changed.

Do anybody knows where are this localtime settings stored?

Bruce B

#11 Post by Bruce B »

All a computer needs is one accurate clock to set the other clock(s) by.

In your case if the RTC is accurate, you can set the system time by it.

hwclock --hctosys


or

busybox hwclock --hctosys


might work

~

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#12 Post by fernan »

Thank's everybody for your time and help.

I think it's SOLVED !!!!

·"$"%$·&%$/$/&@@#@#~@#~

(please excuse my english)

I think this can help all other people that have this problem:

I did the following :

There is a file, a symbolic link called /etc/localtime that is pointing to some file located in /usr/share/zoneinfo/

Check if that link is pointing to your timezone file. In my case,the link should point to /usr/share/zoneinfo/Etc/GMT-3.

If not, YOU NEED TO DELETE THE /etc/localtime FILE, MAKE A NEW ABSOLUTE LINK TO THE APPROPIATE TIMEZONE FILE (located in some of the /usr/share/zoneinfo/ folder) , AND RENAME IT TO "localtime"

It must be an "absolute" link, and not a relative link, because a relative link will give an error in the line 160 of the /etc/rc.d/rc.country script

There is another link: /usr/share/zoneinfo/localtime, but this link is pointing to /etc/localtime , so once you fixed this, both links will be OK.

Once this links are pointing to the appropiate file, you can set the system time using the command Bruce B explained:

Code: Select all

hwclock --hctosys
or

Code: Select all

busybox hwclock --hctosys
Reboot, or not, but clock won't change :D

I don't know why, but every time I changed my time zone settings using the puppy tools, the link pointed to the /usr/share/zoneinfo folder.

Bruce B

#13 Post by Bruce B »

At first fenan, I wasn't going to help, because it can get very complex and justifies a report with citations beyond the scope of a forum post.

More importantly, beyond the scope of what I remembered.

Then it occurred to me that you only have two clocks. If we eliminate theory, we can do something practical and make it work.

Explained:

By now there are soo many Puppies. The premise of the workaround is, no Puppy messes with the RTC.

If this is true and the RTC is set for local time, we can use it to set system time & it doesn't matter what the TZ offset did for or to us.

I'm not sure which of the two commands worked for you. If you want the operation to be seamless then do this. Make a plain text file called /etc/profile.local Put the command in it.

~

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#14 Post by fernan »

Actually what solved the problem was to re-create that link file called "localtime".

There is something wrong with the puppy countrywizard , since if I run that, the link file is created wrong.

Both commands you gave work OK. I've tried both to avoid changing the clock through the countrywizard.

But I don't need to run it at every boot. Now it works fine.

I don't know if this should be informed as a bug, but it looks like...

Bruce B

#15 Post by Bruce B »

fernan wrote:Actually what solved the problem was to re-create that link file called "localtime".

There is something wrong with the puppy countrywizard , since if I run that, the link file is created wrong.

Both commands you gave work OK. I've tried both to avoid changing the clock through the countrywizard.

But I don't need to run it at every boot. Now it works fine.

I don't know if this should be informed as a bug, but it looks like...
I don't recommend reporting it. It is best classified as, well, let me think, how about a Puppy peculiarity?

This so called 'peculiarity' is extremely mind and doesn't affect most users. Since way back I thought there was a problem. Then, well maybe not.

It wasn't until I introduced the third clock, a time server clock did I realize it will take some thinking.

There have been some GUI pets added for this chore.

In my case I modified low level scripts to sync with the time service. I couldn't offer a pet package for this, not even close.

The closest I could think of is a lengthy howto. But posting such a howto on the forum would produce devastating results.

Probably best is a page on the Internet. Even at that, the page would be for people who don't mind modifying Puppy's scripts a little or a lot.

Moreover, it would have to be fairly generic because Puppy changes how it does things.

If people want to use a time server, I think the best step is to install an already made .pet package. If the package doesn't work right, then report a bug on the package.

Also, if you posted a how-to on how you solved the problem with your version, that might be good. I think you do well with English, but if you aren't comfortable with it, we also have a forum in Espanol and you can post a howto thread there very comfortably.

~

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#16 Post by fernan »

I agree, a HOWTO would be helpful ...

What looks like a bug to me is that the countrywizard creates a wrong "localtime" link, but only with certain timezones.

If I choose "cairo" location, for example, it creates a link pointing to the right file. It fails with the links pointing to the /usr/share/zoneinfo/Etc/ folder. The other timezones located in the other folders (Africa, Asia, Australia, etc) work OK.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#17 Post by tasmod »

Can I suggest the following :-

Right click on the firewallstatus icon.
From the menu select Psync.
DON'T click on a time area but instead click on 'Help' button at bottom left and read the details there.

The clue is 'locale'. using -3GMT and expecting the time to keep local is not going to happen.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Post Reply