Set system time

  • Thread starter Thread starter David Gamble
  • Start date Start date
D

David Gamble

Is there a .NET Framework class that can be used to set
the local system time? I do not want to use the P/Invoke
to call the SetSystemTime WIN32 API unless I need to. I
would like to be able to do it from within the Framework.

Thanks for you time,
Dave
 
The .NET Framework does not have a class for setting the
system time. You could use the API you specified, or shell
to the command prompt (using the Process object) and
execute "TIME <newtime>".

HTH.
 
Back
Top