Set Time (for setting puppy's clock)

Core libraries and systems
Message
Author
GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#21 Post by GuestToo »

as far as the forum goes, i think the forum server's clock is about 20 minutes fast ... the time right now is
UTC - Friday, 23 September 2005, 02:36:14
which is my local time:
EDT - Thursday, 22 September 2005, 22:36:14
(i think the server is set to EDT time too)

that is, about 10:36 pm

by the way, the forum server seems to be in Edmonton, Alberta, Canada

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#22 Post by BarryK »

one thing that i am certain of ... EST5EDT is the correct TZ for my timezone ... so that makes it easier to get the other setttings right
Heh heh, that would place you about a longitude going through Bolivia!

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#23 Post by MU »

I updated the dotpup.
The cancel-button works now.

Mark


the existing file can be replaced with this code, if you don't want to install the dotpup (this is for Barry for Puppy 1.0.6 mainly):

Code: Select all

#!/bin/sh

# A small script used to set the time under Linux with hwclock...

HWCLOCK=/sbin/hwclock
if [ -f "/usr/sbin/hwclock" ];then
  HWCLOCK=/usr/sbin/hwclock
fi 

if [ "`whoami`" != "root" ];then

  Xdialog --title "$TITLE" --msgbox "ERROR: You must be root to set the time, exiting..." 0 0
  exit 1
fi


# Title to be used for all Xdialog boxes.
TITLE="Set time tool"

# Now check for hwclock existence...
if ! [ -f $HWCLOCK ] ; then
	Xdialog --title "$TITLE" --msgbox "$HWCLOCK not found..." 0 0
	exit 0
fi

# Get the date (returned in DD/MM/YYYY format by Xdialog.
ENTEREDDATE=`Xdialog --stdout --title "$TITLE" --calendar "Please set the date..." 0 0 0 0 0`
#xmessage $?

if [ "$?" != "0" ] ; then
	Xdialog --title "$TITLE" --msgbox "Aborted." 0 0
	exit 0
fi

# Convert the date to the MM/DD/YYYY format needed by hwclock.
NEWDATE=`echo "$ENTEREDDATE" | awk --source 'BEGIN { FS="/" }' --source '{ print $2 "/" $1 "/" $3 }'`

# Get the time in HH:MM:SS format.
NEWTIME=`Xdialog --stdout --title "$TITLE" --timebox "Please set the time..." 0 0`
if  [ "$?" != "0" ]  ; then
	Xdialog --title "$TITLE" --msgbox "Aborted." 0 0
	exit 0
fi


# Set the hardware clock (RTC) and then the system clock

Xdialog --title "info" --msgbox "Your screen might turn black now for some seconds, just wait..." 0 0

$HWCLOCK --set --date="$NEWDATE $NEWTIME"&&$HWCLOCK --hctosys

THEDATE=`date`
Xdialog --title "info" --msgbox "Finished. Time was set to $THEDATE" 0 0

wpurcell
Posts: 15
Joined: Thu 17 May 2007, 00:27

Set Time

#24 Post by wpurcell »

Hello! Just installed the program. Works great, thanks very much!

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#25 Post by edoc »

Wow, there's blast from the past!

Into which version of Puppy did you install it, please?

I am observing clock problems 2 years after this thread (in 3.01), so the conflict between the hwclock and the one displayed on the desktop (and the one used by apps like Firefox) remains unresolved - at least unresolved as a default part of the distro.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#26 Post by MU »

edoc,
you might have to set the timezone in the desktop-menu.

On my Puppy, "Berlin" (which should be correct) set a wrong zone, so I use "-1" instead, if I remember well.
That works well then.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#27 Post by edoc »

My time zone is fine, I remember that dance from before.

What is happening on two of our three Puppy Linux computers is that the hardware clock must be losing time and dragging the software clock down with it.

I thought Puppy had added an app to the package that automatically sync'd the clocks with a standard.

I am not sure when 3.02 and 4.xx/Dingo will be released but hopefully both will address this.

Meanwhile, is there an app for this for 3.01?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Eyes-Only
Posts: 1043
Joined: Thu 10 Aug 2006, 06:32
Location: La Confederation Abenaquaise

#28 Post by Eyes-Only »

I got so frustrated with this issue, and trying so many variety of "fixes" that didn't work that my final solution to the problem was this:

Seeing that I have 3 hard drive installs and the time all works fine in those between hwclock/swclock I chose my Linux Mint to repair from. So I wiped everything dealing with "time" out of "/etc" and then likewise in "/usr/share/zoneinfo" I believe it was---and then just brought it all over from Linux Mint into my Puppy 3.0.1 frugal install.

(Sidenote: This is NOT a procedure I'd recommend though to anyone else unless they're willing to take the chance of losing data and messing up! Caveat Emptor!)

It's worked a treat and I've never had to fiddle with resetting from the GUIs or anything since. But you can tell I was pretty annoyed if I was willing to risk destroying that fine Pup I'd built up with all of the goodies found here!

Amicalement,

Eyes-Only
"L'Peau-Rouge"
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. 8)
*~*~*~*~*~*

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#29 Post by edoc »

Perhaps the wonderful Puppy developers will take a look at what you have done and find a long-term solution for this to build into every new release?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

ki_harding
Posts: 3
Joined: Mon 01 Sep 2008, 14:07

dot pup package works well

#30 Post by ki_harding »

just download the set time package and it works, great
you will have to download dot pup handler through set up - puppy manager first, then you will be able to install the set time package.
I don't know why my clock changed all of a sudden I've not done anything for it too?

gzer
Posts: 2
Joined: Tue 15 Jan 2013, 06:19

Set Time

#31 Post by gzer »

This is for Puppy Precise 5.4.3
First you’ve gone through the wizard but your Date/Time are wrong
Click Menu/Desktop/Psync Time Server Synchronisation
Make sure your time zone is correct if not
Click Menu/Desktop/Chooselocale Country Setup

Now Click on the Button that relates closiest to your Area of the world
You now have an option to Autostart this everytime your computer starts up

Hope this helps ya
Gzer

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#32 Post by Argolance »

Thanks gzer: Was useful for me!

Cordialement.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#33 Post by Argolance »

Hello,
  • 1- When running Puppy on a PC where Windows is installed, as Windows directly set the hardware clock to the "right" Time, Puppy should have finally nothing else to do that support and display this Time without touching anything... How could this simply be done?
    Since daylight Time change, I absolutely never succeeded in getting the right Time: Puppy always puts its oar by adding or subtracting something to or from the hardware clock Time. :oops: (Though I obviously could, while using Psync: but when there is no active network, this is not convenient!)

    2- The script by tasmod "set_hwclock_type" gently says, while choosing between "software to match hardware" and "hardware to match software": "if you don't know or uncertain, that's ok, just click the 'No' button!" :shock:
    Please, may somebody give "more" details about this configuration script, even for the first choice "What should the hardware clock be interpreted as?": "localtime" or "utc"? This is so laconic that many non English speaking users have some difficulties to well understand how this is exactly working?
Thanks for you attention.

Cordialement.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

/usr/sbin/set_hwclock_type

#34 Post by L18L »

Argolance wrote:... This is so laconic that many non English speaking users have some difficulties to well understand how this is exactly working?
I do not have that difficulties because these messages are translated to my native language 8)
/usr/sbin/set_hwclock_type wrote:#!/bin/sh
#written by pizzasgood, 2009
#GPL license /usr/share/doc/legal/gpl-2.0.txt
#120202 rodin.s: internationalized.
Yes......the terms:
-localtime
-utc
-software
-to match hardware
-hardware
-to match software
could be additionally internationalized
maybe by you :wink:

... and then it is up to the translator

BTW
that is really not Additional Software (PETs, n' stuff)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#35 Post by Argolance »

Hello,
Thank you for answering.

Code: Select all

#written by pizzasgood, 2009
Sorry! This script was created by pizzasgood and not by tasmod.

I saw it was partly internationalized but didn't know if these terms could be translated or not: as they were not, I though it was for a good reason and didn't take the liberty to change something.

"software to match hardware" and "hardware to match software", "What should the hardware clock be interpreted as?", "localtime" or "utc"?: Even translated in French, this needs nevertheless to be explained for the poor silly guy I am... What does this mean, what does the script make? What is it used for? This is confusing and I would like first to understand and then, write some help words to add to the script for user (who wouldn't know or would be uncertain!) to really make his choice with full knowledge of the actions.

Cordialement.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#36 Post by Argolance »

Hello,
Puppy alone on my laptop (Windows not installed)
Hardware clock is set on UTC Time.
Please look at the pictures below (better than long speeches)...
Why my tray clock does not display right Time (+ 1 hour!)? :evil:
I get the right Time if I make my hardware clock lie: UTC -1.
But this cannot be done on machine with windows installed on. So I am always getting 1 hour more!

Is this a bug?
Am I alone to encounter this issue?
Or what's wrong in my configuration?

Cordialement!
Attachments
212012_559x217_easyshot.jpg
(23.13 KiB) Downloaded 1181 times
212537_377x160_easyshot.jpg
(11.69 KiB) Downloaded 1126 times
212556_375x194_easyshot.jpg
(17.75 KiB) Downloaded 1205 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#37 Post by L18L »

Argolance wrote:I get the right Time if I make my hardware clock lie: UTC -1.
Instead of lie please
- adjust your hardware clock in BIOS manually
or
- synchronize that is: try

Code: Select all

psync
and click Europe button
/usr/share/doc/psync.html wrote:Psync - Pour synchroniser l'heure sur un serveur.

Psync peut être lancé à partir du menu Bureau.
...
...
Si c'est ne pas clair, ce n'est pas francais :) :lol:

[edit 10 min later]
BTW
We are in the same time zone
and I just have used psync. Now 1 second earlier than before 8)

[edit 10 min later] http://www.timeanddate.com/library/abbr ... ezones/eu/
Attachments
time.png
(1.94 KiB) Downloaded 1111 times

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#38 Post by Argolance »

Hello L18L,
nstead of lie please
- adjust your hardware clock in BIOS manually
This is exactly what I did: Set the right UTC Time manually through the bios. And it is also here I have to "lie" and set it to UTC -1 hour, otherwise Puppy tray clock displays for example, 12 instead of 11.

As said above, I obviously know it is possible to get the right Time using Psync (and I am actually using it!) but it is a last resort: User not connected to the Internet gets wrong Time and have to correct this manually.
This should not be. This should simply work. And this doesn't!

I am running Puppy precise 5.4.3. Perhaps this doesn't occur with latest Precise version or other Puppy versions (Racy, Vary )?. This didn't with Puppy 4.31.

Thank you.
Cordialement.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#39 Post by L18L »

precise 5.5 (langpack_fr installed :) )

13:29 .... CEST is a lie :P [edit] and not yet internationalized :cry: [/edit]

should be

13:29 .... UTC 8)
Attachments
utc.png
(17.03 KiB) Downloaded 1040 times
sans_utc.png
(17.7 KiB) Downloaded 987 times

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#40 Post by Argolance »

Hello,
I finally found the solution! :D :D :D
It was the Puppy Precise 5.4.3 /etc/rc.d/rc.country file that was the cause of the issue (I found an error message in /tmp/bootkernel.log which alerted me....)! So, I replaced it with the Puppy Precise 5.5 /etc/rc.d/[rc.country file and all is working OK now!
@L18L
Thank you for your willingness! :wink:

Cordialement.

Post Reply