Innovenergy_trunk/csharp/Lib/Time/Unix/UnixTime.Constructors.cs

19 lines
600 B
C#

// namespace InnovEnergy.Lib.Time.Unix;
//
// public readonly partial struct UnixTime
// {
// public static UnixTime FromTicks(Int32 ticks) => new UnixTime { Ticks = ticks };
//
// public static UnixTime FromUtcDateTime(DateTime dateTime)
// {
// var timeSinceEpoch = dateTime - DateTime.UnixEpoch;
// var ticks = (Int32) timeSinceEpoch.TotalSeconds;
//
// return new UnixTime{ Ticks = ticks};
// }
//
// public static UnixTime Epoch => new UnixTime { Ticks = 0 };
// public static UnixTime Now => FromUtcDateTime(DateTime.UtcNow);
//
//
// }