c# - Windows service and changing timezone -


I have a Windows service with .Net 3.5 in C #. It was running on the server for a few weeks when it came to know that the server's timezone was not set correctly, it was right but the service was not restarted. I am surprised that this service did not change the clock.

My question is, will it also be a problem during daylight saving time switches? And if so, what can be done about the restarting of the service?

Handler for the event However, it does not work directly in service:

This event is only lifted when a message pump is running in a Windows service, unless the hidden form is used or the message pump is manually started, this event will not be raised. For a code example that shows how to handle the way system events use a hidden form in a Windows service, see the class.

You need to see Example 2 on this second page:

Example 2

The following code example shows a very simple Windows service that runs events and events, for example a service called Simple Service, the name of the hidden form, and an installer. The form provides message loops, which is required by system events.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -