c# get timestamp in epoch code example Example: get unix time in seconds C# DateTimeOffset.UtcNow.ToUnixTimeSeconds()