获取当前时间转化为时间戳
TimeSpan timeSpan = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0);
Debug.Log(Convert.ToInt64(st.TotalSeconds));
把时间戳转化为日期时间
DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
DateTime nowTime = startTime.AddSeconds(1558340395);
string time = nowTime.ToString("yyyy/MM/dd HH:mm:ss");
Debug.Log(time);