Solved

how to know user changes the clock

Posted on 2010-11-28
3
264 Views
Last Modified: 2012-06-21

How can I distiguish the event which user requests from the event which
'window system' requests?

I use 'SystemEvents.TimeChanged' event in order to recognize if user changes the clock.
However in some cases 'window system' seems to change the clock.
This happens once a week in case of Vista.

 I want to use this event only when user changes the clock.
How can I distinguish those events?

0
Comment
Question by:HFunakawa
3 Comments
 
LVL 1

Expert Comment

by:Ken Lynch
ID: 34229185
This is the system events info I got when I did a manual time change on a vista system:

Look for
Source:       Kernel-General                  
Logged:       Date & Time
EventID:      1                        
Task Category:      None
Level:            Information                  
Keywords:      Time

 time-chg-event-vwr.txt
0
 
LVL 5

Accepted Solution

by:
andr_gin earned 500 total points
ID: 34229430
1.) I think the changing of time every week is the synchronization of the clock with a timeserver.
It is not a clean solution, but you can check for the amount of the change. If the time changes by more than 1 minute, it must be the user because the clock will not be 1 minute wrong in one week. Otherwise it can be the system.

2.) The time can also be changed by the user in the BIOS. Then the operating system can not see this change. You should also consider that

3.) Maybe summer/winter time is also a change.
0
 

Author Comment

by:HFunakawa
ID: 34236001
thanks for answers.

i made a program that checked the time changing more than 1 minute or not.
it seems to work!

thank you all answers again.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question