网络时间校准
using Newtonsoft.Json; using System; using System.Net; namespace TimeVerify { class Program { static void Main(string[] args) { WebClient wc = new WebClient(); var data = wc.DownloadString(@"http://quan.suning.com/getSysTime.do"); var timeStr = JsonConvert.DeserializeObject<TimeModel>(data).sysTime2; var time = Convert.ToDateTime(timeStr); Console.WriteLine(time); Console.ReadLine(); } } public class TimeModel { public string sysTime2 { get; set; } } }