Link : https://coderseditor.com/



using System;
                    
public class Program
{
    public static void Main()
    {
        Console.WriteLine(DateTime.Now.ToString());

        long time = DateTimeOffset.Now.ToUnixTimeSeconds();
        Console.WriteLine(time.ToString());

        // Unix timestamp is seconds past epoch
        DateTime dtDateTime = new DateTime(1970110000, System.DateTimeKind.Utc);
        dtDateTime = dtDateTime.AddSeconds(time).ToLocalTime();

        Console.WriteLine(dtDateTime.ToString());

      

    }
}