Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to fetch server date time form my c# windows application and set the local machine date time according to the server date time.

please help me....

i have fetch server datetime but unable to set this server datetime to local machine date time... i.e my machine datetime
Posted

1 solution

Don't.
Generally speaking, it's a poor idea, because you have no idea what time zone the server is set to - and if it isn't the same as the PC your app runs on, you are going to start really annoying people... Any changes to system settings (and the time is one of those) needs to be very carefully considered, because if you do it willy-nilly, people will stop using your app and start demanding money back - I certainly would.

But if you are absolutely sure, then: MSDN[^] can help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900