get unix time stamp using c# code example Example: c# unix timestamp var unixTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();