T-Clock icon indicating copy to clipboard operation
T-Clock copied to clipboard

Autosync on startup

Open ooker777 opened this issue 6 years ago • 4 comments

What do you think if we add a small checkbox about autosync with time servers when startup? The command is simply:

W32tm /resync /force

ooker777 avatar Apr 11 '19 00:04 ooker777

so... /force is still valid in Windows 10? Doesn't seem to be documented.

Well... it seems the use of W32tm requires admin rights, so there's no way T-Clock would add that when there's T-Clock's own inbuilt SNTP (also requiring admin rights) However, besides the SNTP needing a "rewrite", there's the issue about needing administrative permissions... As such it's still part of what I would like to have, but nowhere near any estimate when or how it might happen.

To be able to support this.. T-Clock would have to create a Service so it could elevate, but it would also have to "install" components into a secure location, such as %ProgramFiles% so that it doesn't expose a security risk. It might even need to validate its own executable... So that's quite some work.

White-Tiger avatar Apr 11 '19 17:04 White-Tiger

Hmm, I thought it's just a simple cmd command? It doesn't even need admin privilege.

On Fri, Apr 12, 2019, 00:22 René Schümann [email protected] wrote:

so... /force is still valid in Windows 10? Doesn't seem to be documented.

Well... it seems the use of W32tm requires admin rights, so there's no way T-Clock would add that when there's T-Clock's own inbuilt SNTP (also requiring admin rights) However, besides the SNTP needing a "rewrite", there's the issue about needing administrative permissions... As such it's still part of what I would like to have, but nowhere near any estimate when or how it might happen.

To be able to support this.. T-Clock would have to create a Service so it could elevate, but it would also have to "install" components into a secure location, such as %ProgramFiles% so that it doesn't expose a security risk. It might even need to validate its own executable... So that's quite some work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/White-Tiger/T-Clock/issues/172#issuecomment-482214344, or mute the thread https://github.com/notifications/unsubscribe-auth/AGYqXUtUtJaKkA31Y3oknyeY3DhhS4thks5vf29SgaJpZM4cof90 .

ooker777 avatar Apr 12 '19 01:04 ooker777

It does need admin privileges... the same way everything that tries to change the current date/time does.

White-Tiger avatar Apr 12 '19 16:04 White-Tiger

Not really sure about this since I don't see it requires me admin privilege, but I find out that it can only sync in a small range of time. If the time gap is large, it reports error.

On Fri, Apr 12, 2019, 23:40 René Schümann [email protected] wrote:

It does need admin privileges... the same way everything that tries to change the current date/time does.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/White-Tiger/T-Clock/issues/172#issuecomment-482642116, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTCUXLOEYJ6D5BLBQFKEM3PQC3O5ANCNFSM4HFB752A .

ooker777 avatar Apr 13 '19 02:04 ooker777