yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] DaveShaw:
Thanks for the English Screen shots. The first one I'm pretty sure is a falling out with the way wkTask Closes the App. As I said in the PM, I'll try and figure it out...

The second problem, though... :confused: If you disconnect an App whilst it is connecting to the Outside world I'd expect a crash. I can handle the crash better if I can find the right one to catch. I'll show a error message that says "Connection lost" but I am against a On Error Resume Next approach ;)

Dave
[Windows Mobile Apps and Games] frmariam:
Thanks man! I know the wkTask issue is not an issue with your but I just recon I might report in the case you could do something to TimeSync that would fix it for wkTask.

About the other one I know that sane ppl will not be querying and then disconnecting the cable thus cutting the internet connection but I recon the same issue should happen if GPRS or Wifi signal is lost during the process... The solution you wrote, giving an error message and bypassing the crash, is sort of what I was thinking too.
[Windows Mobile Apps and Games] DaveShaw:
I think there is a problem with your connection to the outside world for this NTP client (maybe a firewall blocking), my error handling is weak, the NTP Sync has no return value for success or failure.

Also, my Threading code is Bollocks (It was hacking in 0v02). I'll re-factor the lot so it's done properly.

Couple those two with wkTasks agresiveness I think you've found a weak point in my code. I'm gonna go over the TimeSync Class, The Internet Connection Class and the NTP Client Class with a Toothcomb and make 0v04.

EDIT: Updated Post #1 with Development plan :p

C'ya'll when it's done.

Dave
[Windows Mobile Apps and Games] DaveShaw:
0v04 Released

0v04 has been release..

More updates:

0v04

-Changed UI layout (See screen shot) and workflow (Seperate Query and Sync buttons).

-Improved accuracy.

-Fixed Threading problems (hopefully) and a SilentDelay bug.

-New Debug registry option (Change to 1 to enable).

Ta

Dave
[Windows Mobile Apps and Games] nikagl:
Downloading as we speak :)
[Windows Mobile Apps and Games] gorrunwe:
Hello !

You app seems to be great but when i want to connect to a time server, a "Failed to connect" message is displayed.

I don't understand this, as i have a mobile internet connection. Any idea ?
[Windows Mobile Apps and Games] DaveShaw:
Can you tried the lastest build (0v04)?

Ta

Dave
[Windows Mobile Apps and Games] gorrunwe:
Strange thing... I download your app by clicking on the bottom link in your first post (it seems to be the 0.04 release). But when i launch it on my ppc, and select the "About" item, i see that the release is 0.03 !
[Windows Mobile Apps and Games] nikagl:
You may also want to try to go to pool.ntp.org in your browser and confirm it opens correctly in the browser...
[Windows Mobile Apps and Games] nikagl:
For me it says .03 too... and it does not confirm syncing the time (yes/no) anymore?
[Windows Mobile Apps and Games] nikagl:
The .exe packaged in the .cab is still the Jan-02 version...
[Windows Mobile Apps and Games] gorrunwe:
http://pool.ntp.org doesn't work on my browser. But http://www.pool.ntp.org does. Kind of syntax problem i think.
[Windows Mobile Apps and Games] nikagl:
Same here, so I guess we have confirmed that your internet connection is ok (although your provider might be blocking NTP ports). Let's wait for Dave's new version, we might be able to use the new debugging feature for more details :)

Regards,

Nika.
[Windows Mobile Apps and Games] DaveShaw:
Oops my bad.

I had some problems packing the cab's last night. I somehow must have uploaded the bugged version (though I swear I deleted it :confused:), I have now uploaded the CAB I had on my phone (this one I have been testing and it does work ;))

Ta

Dave
[Windows Mobile Apps and Games] gorrunwe:
Ok it is the right release.

But now, when i click on the "Requery Time Server" button, a "NTP Query failed (or has not run yet)" text appears.

Could this be because of my mobile web provider ?
[Windows Mobile Apps and Games] DaveShaw:
Here's a CAB to enable debuging, the log will appear on the device root.

Can you post it here for me? Along with your device model and carrier and what not.

Thanks

Dave
[Windows Mobile Apps and Games] gorrunwe:
Why does the file weigh only 1 kb ?

When i install this new cab, no new log file appears :(
[Windows Mobile Apps and Games] DaveShaw:
It's just a registry tweak.

After clicking on "Query Time Server" you should get a file called \TimeSyncTZ.log.

Ta

Dave
[Windows Mobile Apps and Games] nikagl:
The debug cab-file only sets a registry key (HKLM\Software\TimeSyncTZ\Debug = 1). Dave, you should also post one to disable the key ;)
[Windows Mobile Apps and Games] gorrunwe:
Ok it works, so here is the log file.

Something weird : during each connection attempt, it is said that TimeSync tries to connect to http://example.org

EDIT : in the log file, you can see that the connection to example.org fail. But when i try to do the same thing in my mobile browser, it works.

For information, i run your app on a HTC Diamond and my provider is Bouygues Telecom (France)
[Windows Mobile Apps and Games] frmariam:
Nice. Seems like wkTask can close it correctly now. And seems to work faster (well this time I had access to wifi)!

ActiveSync (as web connectio) for query no longer works though... "NTP Query failed"

GUI Query Called
Server = pool.ntp.org
Attemping Connection to http://example.org
Starting Sync Thread
Connection to http://example.org succeeded.
Attempting NTP Query
Sync Thread Timed out
NTP Query failed (or has not run yet).
[Windows Mobile Apps and Games] DaveShaw:
Thanks for the feedback guys...

I connect to example.org because I found a problem exists with the connection API if I used a domain that didn't exsists (i.e. if the NTP server was removed), this was changed in 0v02 to improve stability.

All that aside, I am still not sure why it won't connect on your device. It has a time out of 15 seconds when attempting the connection to the internet.

If you run the query without a GPRS (E, 3G, H, whatever) does it try to establish one?

I have a mate with a Dimaond on O2 Uk, I'm going to try on his to make sure it works.

If I'm still stuck, I'll look into more debuging info (line by line if needed).

As I said last time I think there is some sort of issue with the connection through AS to the NTP, I use a UDP client to request the data over port 123. You might want to check your firewall and open UDP port 123.

Thanks

Dave
[Windows Mobile Apps and Games] gorrunwe:
Thanks for your answer Dave :)

When i disable my edge connection and try to do a query, i obtain immediatly (that is to say "without any delay") the same error message; exactly like before, when the connection was active.
[Windows Mobile Apps and Games] DaveShaw:
So it establishs a connection to Edge almost instantly, but then says "NTP Query failed", how long does this take to happen? If you check the logs does it still fail to connect to http://example.org ?

Sorry for all the questions but it will help with writing the debug version for you.

Ta

Dave
[Windows Mobile Apps and Games] gorrunwe:
Sorry, i didn't told what i saw correctly :

when the internet connection is disabled, when i click on the query button, the process fails without any activation of the internet connection.

And this occurs instantanetly.
[Windows Mobile Apps and Games] [deXter]:
Great work! Although I would use this over SP TimeSync if only there was a portable version. By portable, I mean a single exe with optional config files, and no CAB. I find CABs overkill for simple apps like this as they unnecessarily pollute the registry, appstore, etc and eventually contribute in making the system slower! ... well, on older PPC like I use anyways, where storage space and CPU comes at a premium. :)

And a feature request: Can you add an option to add TSTZ to the Windows Scheduler, so that it runs automatically at specified times? And/or how about an option to silently launch at startup (with a configurable delay), sync and quit?
[Windows Mobile Apps and Games] nikagl:
You should be able to extract the exe and reg-settings easily using MSCEInf:

http://66.196.80.202/babelfish/tran.../telechargements/msceinf/msceinf.htm&.intl=us

Regards,

Nika.
[Windows Mobile Apps and Games] DaveShaw:
Thanks for the feedback. I might make a standalone version and just supply a CAB for those who prefer CABs (i.e. Me) :p

I am working on the Scheduler in a Future release. The silent launch stuff is in it already. Just create a shortcut in \Windows\Startup to

"\Program Files\DaveShaw\TimeSyncTZ\TimeSyncTZ.exe" silent

The delay is configurable in the registry at the moment. (See the first post - Change Log) I will add support to create this shortcut from the app in another release.

Ta

Dave
[Windows Mobile Apps and Games] gorrunwe:
Hello everyone !

Dave, do you have any idea about my problem ? :)
[Windows Mobile Apps and Games] DaveShaw:
Check your PM mate :)

Dave
[Windows Mobile Apps and Games] ugumba:
After a couple of sessions with TimeSyncTZ, I noticed that the "silent" run was awfully fast - closer to 0 than 15 seconds.

In the registry, I discovered that the SilentDelay value had been changed to "pool.ntp.org". I had not modified the registry myself.

Just a heads up - easily worked around, but a bug nonetheless.
[Windows Mobile Apps and Games] ugumba:
My next experiment was to run TimeSyncTZ towards the end of a Sashimi run, at a point where (hopefully) a WiFi connection can be established.

After a hard reset, my clock is reset to sometime mid-November 2008.

Under these conditions, TimeSyncTZ was completely unable to correct my device's clock. It downloaded a good time from the server, but the calculation of number fo seconds seems to be of very limited resolution (about 16-bit + sign bit?). Also, the calculations seem to overflow into the sign bit. TimeSyncTZ insisted on applying corrections that fluctuated between about -66000 and +66000 seconds.

I had to resort to SP TimeSync, which corrected my time in 2 attempts. (The first attempt was off 1 hour - I guess caused by some DST issue?)
[Windows Mobile Apps and Games] DaveShaw:
Found and fixed that one the other day :) (Copy and paste coding)

Seem's odd, I am using 32bit integers in my code, but I will do some tests and see if I can re-create.

Thanks

Dave
[Windows Mobile Apps and Games] ugumba:
Thanks, Dave!

Yesterday I tried again running TimeSyncTZ with my device believing it was mid-November 2008, and it worked this time. The correction was in the order of millions of seconds, so I was a bit rash in blaming the calculation in general. If it happens again, I'll be sure to write down the dates exactly.

BTW, I also tried a piece of software called TimeSync Expert - I liked its capability of syncing using GPS, HTTP, SNTP and SMS. With no "silent" option, however, it's of little use for me.
[Windows Mobile Apps and Games] l3v5y:
The only issue I have with this is that after a ROM reset (the ROM date is set to 23/12/09) it fails to set the time or date... Manually setting the date to within a few days and then running this gets the correct time.
[Windows Mobile Apps and Games] DaveShaw:
Eyup mate, can I have a bit more detail?

What does the Query report as the Difference?

Are you on 0v04?

Have you got the debug log to hand?

p.s. I am still working on improved Connections Manager and Full Command line support for 0v05.

Thanks

Dave
[Windows Mobile Apps and Games] l3v5y:
489563.66->12/29/08 4:01:38

Then time is reported as being around 1 second off...

For some reason, I can't get the debug log to work...

EDIT:

Looking in completely the wrong place!

GUI Query Called
Server = pool.ntp.org
Starting Sync Thread
Attemping Connection to http://example.org
Connection to http://example.org succeeded.
Attempting NTP Query
Leap Indicator: No warning
Version number: 3
Mode: Server
Stratum: Secondary Reference
Local time: 2/16/09 9:10:25 PM
Precision: 9.5367431640625E-07 ms
Poll Interval: 1 s
Reference ID: ntp0.nl.uu.net (193.67.79.202)
Root Dispersion: 40.6341552734375 ms
Round Trip Delay: 1000 ms
Local Clock Offset: 1574 ms

Sync Thread Success
1.574 secs
Set time to 12/29/08 4:07:43 AM

This is after the first sync...
[Windows Mobile Apps and Games] DaveShaw:
Odd, I'll test this and hopefully have it working in 0v05.

BTW that debug log looks strange, I have re-worked the entire logging system to try and fix all the Comm Manager bugs.

Ta

Dave
[Windows Mobile Apps and Games] chris10230:
hi

i was wanting to run this weekly to make sure everything is in check with the time, in g-alarm but the command line part does not seem to work with silent in it, not entirely sure it is this or g-alarm as i have never used the command line part in it.

If you have an idea as to where i am going wrong then please say. All i am doint is linking to exe, in arguments putting in 'silent' ?

cheers and sorry if this is an annoying post, but the prog seems really good
[Windows Mobile Apps and Games] DaveShaw:
Thanks for the report. Bug's are only annoying because it means I made a mistake :o

The source is so out of date with 0v04 release that I won't look into this yet.

I'll be posting 0v05 later this week, pending some testing, all 0v05 features should be now implemented.

I'll be re-testing your's and l3v5y's problems along with everything else.

Please re-test yourselves with 0v05 when it's out. Hopefully it'll be gone.

Thanks

Dave
[Windows Mobile Apps and Games] Beeble:
doesnt like my data connection

Hi

I'm liking the idea of this, but have a little problem!

It fails to connect (or use the existing [open] connection) using 3g. If i connect to wifi it works perfectly, but doesnt seem to like the celuar GPRS!

I'm currently running ROMeOS on a Raphael and i'm on T-Mobile UK.

The debug file simply says it cant connect to anything, but opera will get to both example.org & pool.ntp.org (using the celuar connection).

Its almost as if its looking for a certain name of connection, which T-mob has renamed (entirely possible i know! T-Mob seems to like things being called T-Mobile Internet, and i'm sure [from previous devices] the default was The internet).

Awaiting V05 to try that, but if you want me to get you any specific feedback please let me know what!

~Beeble
[Windows Mobile Apps and Games] DaveShaw:
I wrote 5 debug versions of 0v04 for a guy (look back a few posts) to get the connection stuff working on all cases.

Wait for 0v05 and it should be OK :D

Dave
[Windows Mobile Apps and Games] GreenGremlin:
Dave

I also had a bug that time could not be set correctly after a hard reset. It set the date in January instead of today. Strange that the latter attempts could neither set the correct time. I've even restarted the program but it did not help.
[Windows Mobile Apps and Games] DaveShaw:
Yeah a few people have seen that.:o

Try setting the date closer to today and try again. I'll re-test before releasing 0v05.

0v05 has a problem with the "Auto-Connect" option using Wifi that I need to fix. I have trouble accuratly testing this connection stuff cos I live in a house with 0-2 bars or GPRS at best. :(

Also, I have been busy, I'll see if I can sneak some time at work tomorrow to test / bug fix before release.

Thanks

Dave
[Windows Mobile Apps and Games] DaveShaw:
0v05 is out - Finally :p

Changes

0v05

-Fixed Landscape viewing so the Sync button wasn't lost on QVGA screens.

-Fixed Problems with Connection class not working on some devices.

-Improved command line support (see "Usage (command line)" on xda-developers post for TimeSyncTZ).

-Fixed l3v5y's wierd old date problem.

-Fixed l3v5y's wierd old date problem (More NTP Client Bugs).

-More class changes to make it a little easier to work with.

Ta

Dave
[Windows Mobile Apps and Games] nikagl:
LOL ;) You gotta love the typos :D
[Windows Mobile Apps and Games] DaveShaw:
What typos :p :D

Dave
[Windows Mobile Apps and Games] F_R_I_T_Z:
NICE. IAM caling at start from TASKBAR using cmd. working like a charm for now.

Thanks
[Windows Mobile Apps and Games] I3INARY:
Great App! Thanks, this app was exactly what I was looking for.
[Windows Mobile Apps and Games] T0mcat1977:
Thanks for this app. Was looking for a possibilty to setup time since I changed my clock.exe to galarm under Mobile Shell 3.

Could only synchronise time over WiFi not over a Active Sync connection.
[Windows Mobile Apps and Games] anbo1306:
logfiles

Great program!

I saw there is a debug option. Where can I find the debug information? I use this program in my startup and sometime it doesn't correct the time.
[Windows Mobile Apps and Games] DaveShaw:
On the root of your device : \TimeSyncTZ.log

You can change where it lives in the Registry by adding / overwriting the string value [HKLM\Software\TimeSyncTZ] \ DebugFileName

Ta

Dave
[Windows Mobile Apps and Games] anbo1306:
Thanks, I found it. I looked everywhere only not in the root :o
[Windows Mobile Apps and Games] jazzneel:
does this work w/ rhodium roms? Like will it make it so I won't have the 1 hour time difference if I sync it w/ eastern (what I am) or do I have to do 1 time zone ahead of me, and if so, will it stay the correct time no matter what?

and lassst question (i have alot of questions lol), if it keeps polling on the internet for time, how much does this drain the battery? thanks!
[Windows Mobile Apps and Games] DaveShaw:
It sync's with a time server running in UTC time. It then adjusts the sync time by your offset from UTC (shown at the top of the App) before it set's the devices time.

It doesn't poll anything, unless you make a mort script app (or similar) to run it every x hours. You can also make it check on boot, but esentially, it is a one off app. I will be adding scheduling to it later... at that point I will look at battery / performance issues.

P.S. I'll be buying a Rhodium soon so if there are any issues I'll find them, but I don't expect there will be any. I am happy to fix any bug reports :)

Dave
[Windows Mobile Apps and Games] asperon:
Would it be possible to get a version that works with Windows Mobile 2003 2nd ed or are you using calls that it doesn't support?
[Windows Mobile Apps and Games] anbo1306:
MortScript

Maybe a nice add-on to a great program.

I have created a shortcut to a MortScript in my startup. This script will wait until a dataconnection is available and then tries to synchronize time. I will try that for every 5 minutes for one hour only. Some registry keys are made to check the correct working. Ofcourse this script can easier or better. All help is welkom.

First I had a shortcut in my startup folder, but most of the time I got a timeout because my dataconnection was not ready yet.
[Windows Mobile Apps and Games] Beeble:
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 On.
/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) - Not yet implemented - Always On.

Just use the /silentdelay:xxx to set the delay, mines currently set for 30000 so there's plenty of time for the phone to wake up properly, enter the sim lock code & have the data connection establish
[Windows Mobile Apps and Games] DaveShaw:
You mean /silent delay:xxx (with a space) ;)

I have been meaning to look at both posts prior to this when my phones back up and running (out of comission at the moment) :)

Dave
[Windows Mobile Apps and Games] Beeble:
Nope! :p my shortcut is "\blahblah\timesyncTZ.exe" silent /silentdelay:30000

No space in silentdelay.

As for WM2003 - had a rummage, i dont have anything running 2003 anymore, oldest thing i have is a Hermes running WM5 - Sorry!
[Windows Mobile Apps and Games] nikagl:
Lol, you gotta love xda-dev - the users know the products better than the developers :p
[Windows Mobile Apps and Games] DaveShaw:
You gotta love xda-devs the dev's fail more than the user's :D

@Beeble, I was confusing myself. The command line will be

silent /silentdelay:xxx (there's my missing space :))

Dave
[Windows Mobile Apps and Games] DaveShaw:
0v06 is out

Finally updated to 0v06. Main feature is a config dialog and auto connect option is finally working.

Changes:

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

See the first post for more.

Ta

Dave
[Windows Mobile Apps and Games] shamus:
Hi Dave

Great app, what do you think about enhancing it with GPS time sync? As far as I know every GPS sattelite has its own atomic clock on board and 3D position is calculated by differences in time radio waves needs to travel from sattelite to the receiver, I remember I have seen application like that for Windows CE sat nav but never seen anything like it for PPC. I've heard one of Mio's PPC have it but probably it works only for their hardware. I can see ony advantages of such solution no need for internet connection and time accuracy probably might be better considering delays with packet transfer over the internet. What do you think about this idea?
[Windows Mobile Apps and Games] DaveShaw:
Hi mate, it's an idea, but maybe a bit outta my scope. This app does what I need it to. I think iGO 8 sync's off the GPS satterlites.

I might look into it, if I get really bored ;).

Dave
[Windows Mobile Apps and Games] petemc947:
Hi, Dave,

which version of .net does timesync need please?

I'm using WM 6.1 pro which is .net2 I believe and get the .net error msg.

Regards
[Windows Mobile Apps and Games] DaveShaw:
It needs 3.5, most of my apps do...:o

You can install it from here: http://xdaforums.com/showthread.php?t=373721

Or just google for .net compact framework 3.5

Thanks

Dave
[Windows Mobile Apps and Games] flitzjoy:
congrats man! the app does well what it meant.

Its small, simple, has command line support. Really perfect. Maybe some UI work someday. But its really fine right now. Thx again.
[Windows Mobile Apps and Games] DaveShaw:
I'm not that skilling in design, but I'm open to idea's (also it was developed to work from QVGA up).

Dave
[Windows Mobile Apps and Games] petemc947:
Thanks Dave, I did that (thanks also to Modaco for the .net 3.5 .cab and config cab) and your great ntp client app works fine now and does exactly what I wanted, i.e.synced Zinc II with with ntp.demon.co.uk.

Regards

Pete
[Windows Mobile Apps and Games] DaveShaw:
Thanks Pete.

Glad to hear it's doing it's job :).

Dave
[Windows Mobile Apps and Games] smuppy:
You're just too good to be true, been looking everywhere for an app like this since I cant add servers to SynchroTime.... SUPERAPP!
[Windows Mobile Apps and Games] Philip:
Scheduling

Is that ever likely to happen, or has development ceased?

Is so, does anybody know of any other freeware that will use ntp to update my clock on a regular basis?
[Windows Mobile Apps and Games] DaveShaw:
It's pretty much stopped. I don't have much time latley, and from working with Scheduler's at work, will take a bit of coding to implment fully in Windows mobile :).

In this case, you are probably best using some freeware task scheduler to call the command line. I found a few by googling this site.

Ta

Dave