Ok,
if you really need it in decimal you could use the following.
public string getnettime()
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "net";
p.StartInfo.Arguments = "time";
p.Start();
p.WaitForExit();
output = p.StandardOutput.ReadToEnd();
output=(output.Remove(0, 40));
output =(output.Remove(5, 42));
DateTime time = Convert.ToDateTime(output);
double dtime = time.Hour + (time.Minute / 60.0);
output = dtime.ToString();
return output;
}
This code converts the time string from the server to a DateTime object, converts the DateTime to a double representation and then the double to a string which can be sent using the serial port.