[MonoDevelop] C#, MonoDev, System Time & Date Problem

rigsmith david.scott-frame at toshiba-ac.com
Wed Sep 5 14:23:50 UTC 2012


Hi

I am trying to change the system time/date on Ubuntu operating system from
c# code. I am using MonoDevelop Complier.

My end user should never see the operating system (FluxBox) nor will they be
provided the passwords for the system so I must build my own control to
adjust the time/date.

I am very stuck and have been on google and trying various things for weeks
and I worry now that I am not going to find a solution without help

I have seen two methods and I cannot implement them

I have tried the following.

System.Diagnostics.Process.Start(“Sudo date 031212001986”);

This fails because it cannot find a TTY or password. 

I have also tried to use DLL import on Kernel32.dll, Enter point =
“SetLocalTime”. This just totally fails as it cannot find the Entry point
(All though it loads the DLL). I guess this method has been intended for C#
on windows.

I have tried quite a few variations and I am just totally stuck/confused. I
really need to ability to change the system clock without the user knowing
passwords and having excess to the operating system.

Any method will do, I couldn’t care if its 1000 lines of code or 2 lines. I
just really need to adjust this clock and date urgently.



--
View this message in context: http://mono.1490590.n4.nabble.com/C-MonoDev-System-Time-Date-Problem-tp4656499.html
Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.


More information about the Monodevelop-list mailing list