获取时间戳

private string GetCurTimeStamp()
{
     TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
      return Convert.ToInt64(ts.TotalSeconds).ToString();
}

 

posted @ 2013-05-06 10:46  Marble  阅读(124)  评论(0编辑  收藏