Esempio n. 1
0
        internal object ConvertToBaseValue(object logicalValue, TimestampMicrosecondsSchema schema)
        {
            DateTime date;

            if (logicalValue is DateTimeOffset dateTimeOffset)
            {
                date = dateTimeOffset.DateTime;
            }
            else
            {
                date = ((DateTime)logicalValue);
            }

            return((long)(date - DateTimeExtensions.UnixEpochDateTime).TotalMilliseconds * 1000);
        }