Exemplo n.º 1
0
        /// <summary>
        /// Converts the given epoch time to a <see cref="DateTime"/> with <see cref="DateTimeKind.Utc"/> kind.
        /// </summary>
        public static DateTime ToDateTimeFromEpoch(this long intDate)
        {
            var result = EpochTime.DateTime(intDate);

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts the given date value to epoch time.
        /// </summary>
        public static long ToEpochTime(this DateTime dateTime)
        {
            var result = EpochTime.GetIntDate(dateTime);

            return(result);
        }