Date Bug on Puppy 431?

Booting, installing, newbie
Post Reply
Message
Author
CoffeaRobusta
Posts: 6
Joined: Sat 13 Jun 2009, 02:56

Date Bug on Puppy 431?

#1 Post by CoffeaRobusta »

Is there a date bug on Puppy 431?

Running debian with puppy frugal install. Debian gets the date/time right but I think it uses a NTP server to gets its time. Puppy used to get the date/time right when I had puppy setup as a dual-boot with win98se.

Funny thing is puppy's time differs from the time reported by debian by plus 8 hours. Funny since my time zone is 8 hours behind gmt.

running date from command line yields:

Code: Select all

# date +%D%t%T%t%z%t%Z
04/11/10      01:38:36      -0800      GMT+8
which is 8 hours ahead of my time zone (that should tell you where in the world I am). Notice that date is reporting that my time zone is both -0800 and GMT+8. This cannot be.

Not a big deal but is there a way to fix this?
Bruce B

Re: Date Bug on Puppy 431?

#2 Post by Bruce B »

CoffeaRobusta wrote:Not a big deal but is there a way to fix this?
Yes of course there is and fixing the output it is not a big deal.

The fix should be for real, not just an output work around.

Try this command date -R as an easy way to show the system clock's relationship to UTC time.
CoffeaRobusta
Posts: 6
Joined: Sat 13 Jun 2009, 02:56

#3 Post by CoffeaRobusta »

Hi Bruce,

Thanks for the reply. I think a real fix is better than a work around, sure.

Code: Select all

# date -R
Sun, 11 Apr 2010 04:00:33 -0800
This is the correct time zone (not far from you Bruce) but the wrong time.

I can reset the date with date -s "4/10/10 21:00", but it will not stick on reboot.

typing just the command date at this point yields:

Code: Select all

Sat Apr 10 21:01:55 GMT+8 2010
While date -R yields:

Code: Select all

Sat, 10 Apr 2010 21:02:09 -0800
I have a PII gateway solo running puppy 431(frugal) with a debian lenny base install. Why? to learn linux....my fiancee calls it a strange hobby.
looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#4 Post by looseSCREWorTWO »

For me, Puppy is not the strange hobby. WinDOZE is the strange one.

All those people using WinDOZE, they are like someone who drives a car and doesn't know anything about the car - not even how to change the wheel if they get a flat.

And all the time in WinDOZE it's pay for this, pay for that. Spend $700 on a new computer so they can use the latest WinDOZE, then a few years later they have to upgrade again. WinDOZE is like a crazy cat that goes round and round in circles chasing it's own tail.
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#5 Post by Pizzasgood »

Puppy defaults to assuming HW clock is localtime. Other distros usually assume it is UTC time, and linux converts it to localtime when you view it. If you use one of them with Puppy, there will be conflict. Looks like that's what happened - Debian set the HW clock to UTC, and then Puppy read it assuming it was localtime.

Solution: Set Puppy to assume UTC time, or set Debian to assume localtime, and then correct the clock to match whatever you go with.

How? If you want to change Puppy, see here:
http://www.murga-linux.com/puppy/viewtopic.php?t=41680

To instead change Debian, try checking their configuration tools. They probably have an option for it. Else try google.


For saving the current system time, use the hwclock command. You'll need the --systohc option to tell it to save, and either the --local or --utc option depending on which you want the HW clock kept on. Note that that does nothing to inform your OS of what it should interpret the HW clock as on bootup. See above link for directions for Puppy....


FYI, the GMT+8 thing is because POSIX uses the opposite of what everybody else uses, and Linux timezones follow POSIX. Personally I prefer setting my timezone to a more descriptive one (US/Eastern, right now) which has the benefit of accounting for DST automatically if I also keep my HW clock on UTC (syncing from a server can do that instead, but that only works while you are connected to the net. My laptop, for example, is specifically configured to not automatically connect to wifi unless I tell it to).
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Post Reply