Setting local machine's date/time

  • Thread starter Thread starter Joshua Moore
  • Start date Start date
J

Joshua Moore

Does anyone know how I'd set the local computer's date/time in C#?

Thanks in advance,

Joshua Moore
 
I receive a DateTime object from a webServer, i just need to know the
commands to set the local time on the pc.
 
Hi,
As far as I know, there is no class in .Net to do this. You have to go
the unmanaged way using pInvoke

I havent really tried it but you can try using the SetLocaleInfo in
Kernel32.

hth.
Nitya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top