MySQL转换为C#中的时间
示例代码:
DateTime pStartTime = new DateTime(1970, 1, 1);
pStartTime = pStartTime.ToLocalTime();
DateTime pValue = pStartTime.AddSeconds(mysqltime);
return pValue;

C#转换为MySql中的时间(其实是int型字段)
DateTime pStartTime = new DateTime(1970, 1, 1);
pStartTime = pStartTime.ToLocalTime();
TimeSpan pTS = DateTime.Now.ToLocalTime().Subtract(pStartTime);
mysqltime = Convert.ToInt32(pTS.TotalSeconds);  //即1970-1-1开始的秒数