Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect manual time change and daylight savings time events in windows events log

I would like to detect during my C# application run-time a manual change of the system time and date and automatic daylight savings time change.

Moreover I am looking for a way to detect these changes that happened during the time the application was offline when the user launched the application.

In this page http://support.microsoft.com/kb/815314 there is an explanation how to scan the events log but I couldn't find something that will identify an event uniquely as time change event.

like image 872
Oren Avatar asked May 26 '11 13:05

Oren


People also ask

Which Windows 7 event logs will record system time changes?

4616: The system time was changed. This event indicates the old and new system time as well as who did it as specified in the Subject: section. Process information shows the program that was used to change the time.

Does Event Viewer show local time?

Events are stored in UTC time but shown in your local time. The OS always works with UTC timestamps, but Event Viewer (like other programs) converts them to your local timezone for display purposes.

What are the 5 different types of windows logs available on the Event Viewer?

Types of Event Logs They are Information, Warning, Error, Success Audit (Security Log) and Failure Audit (Security Log).


1 Answers

You can use the SystemEventsClass to respond to a time change event during runtime.

As for the event log you can try digging some info about Event ID 520 in the windows security log, this post has some info about it.

like image 50
Petko Petkov Avatar answered Oct 28 '22 13:10

Petko Petkov