Psync Time Synchroniser Version 2.9 & 2.7-64bit

Core libraries and systems
Post Reply
Message
Author
User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

Psync Time Synchroniser Version 2.9 & 2.7-64bit

#1 Post by tasmod »

Version 2.9
New version of hwclock meant the time was set incorrectly in new versions of Puppy if Psync was run first.
Norm Pierce wrote a small patch to cure this so I've added his version here.



Version 2.8

Added conditional check to the autostart to check whether wifi is in use.
Checks for wifi or wired, waits for wifi to 'up' then runs autostart if so selected.

====================

Version 2.7 Bug fix

Thanks to Burunduk.

Bugfix for change in clock file I missed when testing.

=====================


Version 2.6-64

Only for 64bit Puppys.

Compiled the used ntpdate in 64bit as well as the app. Works ok in Fatdog 64

============================

Version 2.6

I'm hoping this will once and for all trap the text errors in the final offset time report window when the server text changes length.

This means no interim releases when server text changes length.

(Sorry if it came a bit quick after 2.4. It's just this issue has annoyed me long enough.)

Version 2.5


Added DST dates display when time changes apply, if applicable to timezone.

Small change in code, it now recognises if there is no DST applicable.


==============================


Posted notes:-

You need to set your Timezone geographically for DST to work. i.e Europe/London - Europe/Madrid etc to match your nearest location to allow DST to apply to the time clock.

Scroll through the Puppy menu Desktop/Timezone list to set it to nearest location.

If you use GMT offset, Psync will still work but without DST changes. (You must reboot to make setting take)



Psync now checks from the internet which region servers are currently 'active' to set the time and uses those. This ensures a constant pool of servers, so no user intervention is required
.


======

And I thought it was a joke :lol:
----- Time and time zones on Mars -----

Some people have adjusted their work schedules to fit Mars time.
Dozens of special Mars watches were built for Jet Propulsion
Laboratory workers who kept Mars time during the Mars Exploration
Rovers mission (2004). These timepieces look like normal Seikos and
Citizens but use Mars seconds rather than terrestrial seconds.

A Mars solar day is called a "sol" and has a mean period equal to
about 24 hours 39 minutes 35.244 seconds in terrestrial time. It is
divided into a conventional 24-hour clock, so each Mars second equals
about 1.02749125 terrestrial seconds.

The prime meridian of Mars goes through the center of the crater
Airy-0, named in honor of the British astronomer who built the
Greenwich telescope that defines Earth's prime meridian. Mean solar
time on the Mars prime meridian is called Mars Coordinated Time (MTC).

Each landed mission on Mars has adopted a different reference for
solar time keeping, so there is no real standard for Mars time zones.
For example, the Mars Exploration Rover project (2004) defined two
time zones "Local Solar Time A" and "Local Solar Time B" for its two
missions, each zone designed so that its time equals local true solar
time at approximately the middle of the nominal mission. Such a "time
zone" is not particularly suited for any application other than the
mission itself.

Many calendars have been proposed for Mars, but none have achieved
wide acceptance. Astronomers often use Mars Sol Date (MSD) which is a
sequential count of Mars solar days elapsed since about 1873-12-29
12:00 GMT.

The tz database does not currently support Mars time.
Attachments
psync-2.9.pet
hwclock patch version
(6.25 KiB) Downloaded 1478 times
Psync-2.7-64.pet
64 bit version
(124.79 KiB) Downloaded 1813 times
meridian2.jpg
Greenwich meridian line, not far from me.
(17.16 KiB) Downloaded 4163 times
psync24.jpg
(42.05 KiB) Downloaded 3883 times
Last edited by tasmod on Wed 12 Jun 2013, 09:17, edited 94 times in total.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#2 Post by Sylvander »

Installed the program OK.
It ran OK.

When I synchronized the time it set my clock forward from about 17:30 on Fri 29th May to Sat 30th May some minutes after midnight.
I'm near Edinburgh, Scotland, UK.

Have now manually reset my time to correct it.

How do I configure the prog to make it do what it aught?

My clock [in BoxPup 4.1.3] is showing 17:32 at the moment...
Any idea how I should configure it to display seconds too?
Attachments
00.jpg
(7.89 KiB) Downloaded 7687 times

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

#3 Post by tasmod »

What did the timezone report ?

Sounds like you haven't set a timezone.

For seconds, change %R to %X
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

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

#4 Post by tasmod »

You will need to reboot if you change timezone to make it set.

I've posted it as Psync, it just has minor changes to the view.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#5 Post by Sylvander »

Time zone was/is set to GMT+0 = London etc.

See screenshot before using "Time synchronizer" and then after.

Setting %R to %X added seconds but changed from 24hr clock to 12hr. :(
Attachments
00.jpg
(38 KiB) Downloaded 7636 times
01.jpg
(38.42 KiB) Downloaded 6793 times

dawnsboy

#6 Post by dawnsboy »

I downloaded and installed this program, set the time zone, rebooted and then synchronized the clock. It worked just fine. Thanks.

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

Re: Psync Time Synchroniser gui

#7 Post by tlchost »

tasmod wrote:This is not entirely original but it's at least graphical.
Error....no attachment

No there is one....false alarm

Bruce B

#8 Post by Bruce B »

tasmod wrote:What did the timezone report ?
Sounds like you haven't set a timezone.
Yes, I think (we) will need to give users some support with the TZ.

The work and interface looks superb! Well done!

The CLI generated these two lines:

[~] psync
/usr/bin/psync: line 55: rdate:: command not found
/usr/bin/psync: line 56: Use: command not found

[~]

Bruce B

#9 Post by Bruce B »

Sylvander,

I can't tell by your posting. Do things show right in terms of
TZ and date+time after reboot?

If not, please detail.

Bruce

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#10 Post by 01micko »

Hey Rob

Nice little app!

As it turns out, my system time was only 11 seconds fast, so your Psync corrected it instantly. Thanks,

(and it seems quite compatible with Upup :wink: )

Mick
Puppy Linux Blog - contact me for access

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#11 Post by Sylvander »

Bruce B
Just now boot my PC.

Timezone reads GMT+0 (London etc)...
[Our timezone is London etc, but clocks here and now are set forward 1hr for summertime]
Day, date, time all correct.
Run Psync...
"NTP Time Server Synchronizer" shows the time as it is on my clock and GMT -0.3 seconds.
[Is this the amount my clock differs from the server time or what?]
Hit the synchronize button...
It moves the time back by 1 hour exactly.
The ntptime command makes no correction! :(
So I manually reset it forward 1 hour.

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

#12 Post by tasmod »

OK, now I know the problem.

You must set your Timezone geographically. i.e Europe/London Europe/Madrid etc to match your nearest location.

Scroll through the list to set it to nearest location.

NOT by GMT offset.

This is because the built in commands use the locale settings.

Locale contains information on offset plus DST etc. allowing psync to set according to location.
It also allows the desktop clock to auto change for DST.

GMT file is just a numerical offset etc. which means psync ignores it and sets your clock according to server location (USA)

Rob
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

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

#13 Post by tasmod »

The offset shown is the time difference between the 'motherboard' hardware clock, also known as RTC (Real Time Clock) and the 'system' clock.
RTC is kept going by a small battery when PC is powered off. Also known as CMOS battery.

The 'system' clock is set by the Puppy kernel on bootup and is then kept running by software.

Depending on accuracy of the software 'ticks' the system clock will drift from the RTC clock time. Especially if system is not powered down for some time.

Psync reads your RTC and your 'system clocks' and shows the difference, usually a fraction of a second, unless you have never synchronised it before.

Psync will read the clocks and then when clicked will synchronise all clocks to a public time server.

If the display blanks, just move your mouse etc.


Psync uses NTP servers to obtain a network server time. I'm working on an update to provide a list of servers around the world so choice can be made nearer to your location.

Depending on location of server, ISP connection speed, your PC, etc then your time will always be out by a few milliseconds or so to 'atomic time'.

That is known as 'time' latency.

Rob
Last edited by tasmod on Tue 18 Oct 2011, 09:22, edited 2 times in total.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

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

#14 Post by tasmod »

Sylvander,

Use %T for hrs min secs in 24hr format.

Rob
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#15 Post by Sylvander »

1. "You must set your Timezone geographically"
OK, it's now set to "London" and all is looking good. :D
My little travel clock here is only 6 seconds slower [not bad eh?]
That because it took my wife 6 seconds delay to set it when the TV clock changed to the next minute.
Hence I have [imprecise] confirmation that Psync is setting the time correctly.

2. "Use %T for hrs min secs in 24hr format"
That did the trick!
How easy is that?
When you know how that is.

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

#16 Post by tasmod »

Beware, it's very easy to be hooked on 'time' :D

It's a fascinating subject for something so intangible.

Will be posting sometime today (if I finish it) a version with choice of NIST and NTP servers to set the time.

Rob
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Bruce B

#17 Post by Bruce B »

Rob,

If you are going to do an update would you mind changing
the text in one field?

From Time Zone to TZ Variable

The reason why is Puppy Time Zone as displayed is likely
never true, but displaying the TZ variable is always true
even though it doesn't reflect a time zone the user lives
in.

For example - I live in PDT

The system is true at PDT and the UTC internet offset is true at UTC -0700

There is however no time zone PDT+7 anywhere in the
world. Although there is a TZ variable with that data.

Even if Puppy users use the Etc/GMT files, it still won't
display the true time zone for the user.

See attached photo

Bruce
Attachments
tz_variable.png
(19.93 KiB) Downloaded 1830 times

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#18 Post by markofkane »

I got it I think.

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

#19 Post by tasmod »

OK, update posted.

Bruce, I've changed TZ as requested.


Please note all.

The NTP button uses a seperate program called ntpdate. This checks a number of servers (as set by me) and averages the time error before setting your 'time'.
This makes for more accurate time setting but it will take slightly longer to execute.

At the moment it checks 2. Both at NPL in the UK.



This app is now growing which is something I didn't want to do, hence I've left the original 0.1 version on thread.

It will grow more if I use a list choice for the servers. we'll see. 8)

Rob
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

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

#20 Post by tasmod »

Bruce,

Something struck a chord just now.

I remember that Puppy treats timezone offset differently. It uses reverse notation :?

This won't affect users but it will cause bemusement.

Hence your 'TZ variable'

Wonder if anyone else will notice?

Rob
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Post Reply