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

#16 Post by GuestToo »

How can this be, please?
you have your timezone set wrong
it will not work properly if it is set wrong

click Set Time Zone in the Control Panel menu
click the +4 button
edit /etc/TZ and change UTC+4 to EST5EDT

your time zone should be set correctly now
you will probably have to set your time zone to +5 when you go back to Standard Time

it would probably be a good idea to reboot after setting the time zone

after you set the time zone correctly, if the clock is wrong, it's because the clock is set wrong ... set the clock and it should be ok

if you go to: http://andrewu.co.uk/clj/timezone/
it should show you that everything is set properly

the UTC time should be the correct UTC time
you can get the correct UTC time here
(scroll down a bit)
it should also tell you the correct local time in Florida
all the information on the andrewu site should be correct

also, if your time zone is set correctly, you can type
rdate -p time.nist.gov
and it will print the correct time ... if it doesn't, it's because your time zone is wrong

you could put echo EST5EDT > /etc/TZ in rc.local and if Puppy changes TZ behind your back, it will be set to EST5EDT again the next time you boot

i know the Puppy Time Zone Wizard says EST - New York City is -5 ... but it's not ... it's wrong ... see the man pages for hwclock and tzset
The offset string ... specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). The offset is positive if the local time zone is west of the Prime Meridian and negative if it is east

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

#17 Post by BarryK »

i have a program that sets the clock automatically from the internet, but it requires that you set the time zone correctly (there is 1 correct setting and 23 wrong time zone settings ... Barry's time zone wizard works fine, it's just that the sign is backwards ... so if your time zone is EST, the offset is +5 not -5, and so on)
GuestToo,
which one is correct?

Also, see the News page for 23rd September.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#18 Post by GuestToo »

for Puppy 1.0.5rc, my timezone seems to be correct if /etc/TZ is EST5EDT and /etc/localtime is symlinked to GMT+4

i will probably have to change the timezone to +5 in October

EST5EDT is definitely correct for my timezone
because it's daylight-saving time, it is using the EDT part, so date prints EDT as my timezone ... the letters are not important, the offset number is important ... when it uses EDT it is using an offset of +4 ... in other words, EST5EDT during daylight saving time is the same as UTC+4 ... EST5EDT during standard time is the same as UTC+5 ... the thing about EST5EDT is it should automatically change the time by 1 hour when daylight saving time ends in October

time stuff can get awfully complicated and confusing ... partly because there are so many zones with different (arbitrary and politically created rules)

another thing that is confusing is that the time displayed will change if you change any of the time configurations ... for example, change TZ, the symlink to localtime, the hardware clock setting, the UTC variable, and they will all change the clock display

using UTC=1 is easier ... but if you dual-boot Windows, it wants the hardware clock to be set to local time ... and it will usually automatically reset time that the hardware clock is set to for daylight saving time ... so Linux usually does not try to change the hardware clock setting too, or it would cause problems ... if you dual boot Linux and Windows, then Windows should probably reset the hardware clock for daylight savings ... if you run only Linux, then you will probably need to reset the time zone twice a year

rdate seems to work properly only if you set the timezone correctly ... it's working properly now on my machine with TZ=EST5EDT and localtime symlinked to GMT+4 ... Tor also seems happy ... it prints error messages if your clock is not set properly

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

UTC=1 is a lot easier ... you just set the hardware clock to UTC and set TZ to display the correct local time ... but Windows doesn't like UTC

it's not rocket science, but it's complicated enough ... where's the aspirins?

User avatar
dewdrop
Posts: 298
Joined: Tue 30 Aug 2005, 01:54
Location: Texas USA

Time

#19 Post by dewdrop »

Edoc,

I see your post as saying it was posted at
Posted: Tue Sep 13, 2005 9:12 am Post subject:

Dewdrop
edoc wrote:
GuestToo wrote:
I am in EST and I currently see 18:30 in the bottom right corner.

What date and time stamp do you see on my post, please?

Thanks! doc

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#20 Post by GuestToo »

i think the dates on files are set according the how the kernel clock is configured, which is different from the system clock and from the hardware clock ... apparently, the kernel clock is set by hwclock when it sets the system clock from the hardware clock

all i know, is that some programs are unhappy with the way Puppy's Time Zone wizard sets things, but they seem to be relatively happy if you reverse the sign of the offset ... i've tested it for my time zone and few other time zones i'm familar with and it seems to work ok with all of them

i'm not totally sure how the daylight saving shift works with Puppy ... i think if you use local time, the system is assuming you are dual-booting with Windows and that Windows is going to reset the hardware clock by 1 hour, and behaves accordingly

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.

Post Reply