TimeSpan timeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1)); string timeStamp = ((int)timeSpan.TotalSeconds).ToString();