[APP] TimeSyncTZ 0-06 - NTP Time Sychronisation Client (06-JUN-09))

Search This thread

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Info:
TimeSyncTZ is a Time Zone aware NTP client that also copes with Daylight Saving Time (DST). I wrote this after using an app called Sychro Time that only synced to UTC time rather than British Summer Time.

Screens:
Main0v06.png
Config0v06.png


Features:
  • 10 nist time servers to choose from.
  • Auto connects to the internet.
  • Silent running mode from the command line.
Usage (command line):
TimeSyncTZ can be started from a shortcut with any of the following parameter combinations. silent must be specified.

Code:
TimeSyncTZ.exe silent [/debug | /debug+ | /debug-] [/timeout:ms] [/silentdelay:ms] [/server:address] [/autoconnect | /autoconnect+ | /autoconnect-]

silent	                Mandatory first param to enable use of command line mode.
/debug[+/-]            Enable/Disable Debugging (Specifying enables, use +/- for explicit on/off) - default Off.
/timeout:ms            Number of miliseconds to wait before the NTP class times out - default 20000.
/silentdelay:ms        Number of miliseconds to wait before attempting the Sync (Useful when auto running when starting the OS) - default 15000.
/server:address        Address (IP/DNS) of the Server to sync with, if not specified will use the last server - default pool.ntp.org.
/autoconnect[+/-]      Enable/Disable auto connection to the internet (Specifying enables, use +/- for explicit on/off) - default On.


Change Log:
Download Full Change Log

0v06
-Added Config Dialog
-Fixed AutoConnect option
-Improved Error Handling (See \TimeSyncTZ_Error.log if the program crashes). Now logs silent mode errors too.
-Fixed LastSync bug from 0v05

Todo: (Expected fix in release)
  • Scheduling support, menu item to create "auto run" shortcut and a "Run when Internet connection established" support (0v07).
Known Issues:
  • Display problems in CE (#123)
  • Need to double sync when in DST and massively out of date (#128)
Credits:
Valer Bocan (for the C# NTP Class).
d0ugie (for encouragment)
nika (for support, as ever)
slumpz (for pool.ntp.org)
l3v5y (for looking after the thread)

MD5 Hash:
Code:
0v06 - FEDBBB61D18990DD8E04B9B7484A73DA
 
Last edited:

bdumch

Member
Oct 21, 2007
32
0
Moto G7 Plus
Can you clue me in to why one might use this app? I travel all over the US and the network sync for time zones built into my phone is crap and I can't deal with wasting time fixing appoinments after changing time zones.
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Can you clue me in to why one might use this app? I travel all over the US and the network sync for time zones built into my phone is crap and I can't deal with wasting time fixing appoinments after changing time zones.

It doesn't Sync Time Zone's it Sync's your time, but in your own time zone (set in regional settings) rather than in UTC time.
 

d0ugie

Senior Member
Jan 30, 2007
563
44
New York
batteryboss.org
TimeSyncTZ FTW!

Bravo Dave. In software and other areas in life it often eludes us that simplicity and usefulness are not mutually exclusive.

Thanks for letting me host it. I didn't just add it, I ditched your competitor of sorts sptimesync, a move which is a first for my site.

Doug
 

l3v5y

Retired Senior Moderator
Sep 13, 2007
7,485
44
32
Bristol
I love the "I'm a programmer..." line... :)

Thanks for the update. Now I can get the time right whenever I startup my phone... And that happens a lot with excessive ROM flashing and unstable software!
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Not sure whether I've ever posted this, but when you sync your phone calendar appointments, and sync the time afterwards you might get strange notifications, and errors (I've had this several times). Nowadays I always perform the following steps when ROM-updating:

1. Update ROM, usually I do not change time/date with the initial screens
2. Run timesync + soft-reset
3. Run Sashimi (or UC, or whatever you use to install your apps ;))
4. Sync my exchange account (= contact & calendar)

Funny thing I noticed is that syncing exchange/calendar takes a long time on WM6.1 (every 100 cal-items it delays for a few minutes), which does not occur on WM6.0... (yeah, I'm running a 6.0 default ROM currently :D)

Regards,

Nika.
 

thierryb

Senior Member
Nov 12, 2005
244
2
Le Vesinet
I get this error choosing the last server in the list.
Works with the first ones.
Thanks for the tool.


TimeSyncTZ.exe
Exception
Un message d'erreur est disponible pour cette exception, mais il ne peut pas être affiché, car ces messages sont facultatifs et ils ne sont pas actuellement installés sur ce périphérique. Installez NETCFv35.Messages.FR.wm.cab pour Windows Mobile version 5.0 ou ultérieure ou NETCFv35.Messages.FR.cab pour d'autres plateformes. Redémarrez l'application pour voir le message.

à TimeSyncTZ.NTPClient.Connect(Boolean UpdateSystemTime)
à TimeSyncTZ.TimeSync.ThreadSyncTime()i
 

slumpz

Senior Member
Jul 27, 2008
75
6
Hi, it's better if you choose pool.ntp.org as the default server. It will automatically select the nearest server according to your IP address.
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Yup, same issue on English ROM. Maybe Dave knows why?

Another question I have is that it constantly says it would like to correct about 1 sec (between 0.7 to 1.4 is the values I've seen) after trying to sync again. Any thoughts on why? Possibly it's the time it takes for the code to query and/or set the time?

Regards,

Nika.
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
I came across one more (minor) bug:

When the TZ is GMT+1 and you sync from some invalid time (in my case the ROMs built date/time, which was sometime in 2007!), it syncs to one hour ahead. So for instance, phone is set to 14/02/2007 08:13, the current time is 01/01/2008 20:30, it will sync to 01/01/2008 21:30 (instead of 20:30).

Setting it back to one hour before, it will sync fine the next time...

Regards,

Nika.
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
I've used the silent option btw (added a shortcut to my Sashimi Root folder that automatically adds it to the \Windows\Startup folder):

TimeSyncTZ.exe silent pool.ntp.org

Regards,

Nika.
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
I get this error choosing the last server in the list.
Works with the first ones.
Thanks for the tool.


TimeSyncTZ.exe
Exception
Un message d'erreur est disponible pour cette exception, mais il ne peut pas être affiché, car ces messages sont facultatifs et ils ne sont pas actuellement installés sur ce périphérique. Installez NETCFv35.Messages.FR.wm.cab pour Windows Mobile version 5.0 ou ultérieure ou NETCFv35.Messages.FR.cab pour d'autres plateformes. Redémarrez l'application pour voir le message.

à TimeSyncTZ.NTPClient.Connect(Boolean UpdateSystemTime)
à TimeSyncTZ.TimeSync.ThreadSyncTime()i

I get the error "No such host", which probably means I that some of the server's in the list are wrong. For the next version, I'll re-test the server list and maybe add pool.ntp.org.

Yup, same issue on English ROM. Maybe Dave knows why?

Another question I have is that it constantly says it would like to correct about 1 sec (between 0.7 to 1.4 is the values I've seen) after trying to sync again. Any thoughts on why? Possibly it's the time it takes for the code to query and/or set the time?

Regards,

Nika.
Hi Nika,
I think it's the delay between the request and reply, I got the same with SynchroTime. Most of the NTP code isn't mine :).

I came across one more (minor) bug:

When the TZ is GMT+1 and you sync from some invalid time (in my case the ROMs built date/time, which was sometime in 2007!), it syncs to one hour ahead. So for instance, phone is set to 14/02/2007 08:13, the current time is 01/01/2008 20:30, it will sync to 01/01/2008 21:30 (instead of 20:30).

Setting it back to one hour before, it will sync fine the next time...

Regards,

Nika.

This I am unsure of, I'll try and re-test this when I next re-open the code ;). Was it a Kaiser ROM, if so let me know which and I'll flash it to be sure. Do you flash and change the time zone as part of the "Tap screen to Setup" or change it in Windows afterwards?

Ta
Dave
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
This I am unsure of, I'll try and re-test this when I next re-open the code ;). Was it a Kaiser ROM, if so let me know which and I'll flash it to be sure. Do you flash and change the time zone as part of the "Tap screen to Setup" or change it in Windows afterwards

Hi Dave,

I've had this with all ROMs (yes it's Kaiser, current is a WM6.0 ROM, see my sig) as far as I remember. Possibly you could even try to set your time back, set it to GMT+1 and sync, which will set the time to a GMT+2 time. I'll check when my phone is done syncing ;)

Regards,

Nika.
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Shorcut in my startup turned out not to be so successful as it fails to connect every time I soft-reset. I guess the HSDPA connection has not yet correctly initialised when the startup folder is executed. Maybe you can add a command-line like "delay XX" where it delays doing the sync?

Regards,

Nika.