Get Now Hour Unix - CSharp System

CSharp examples for System:DateTime Unix

Description

Get Now Hour Unix

Demo Code


using System;/*  ww w .  j  ava 2  s.co  m*/

public class Main{
        public static long GetNowHourUnix()
        {
            return (long)(DateTime.UtcNow - DateTime.Parse("1970-01-01")).TotalHours * 60 * 60;
        }
}

Related Tutorials