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.
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.
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.
Types of Event Logs They are Information, Warning, Error, Success Audit (Security Log) and Failure Audit (Security Log).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With