internal static void ConvertToManaged(out DateTimeOffset managedLocalDTO, ref DateTimeNative nativeTicks) { long ticks = 504911232000000000L + nativeTicks.UniversalTime; DateTimeOffset dateTimeOffset = new DateTimeOffset(ticks, TimeSpan.Zero); managedLocalDTO = dateTimeOffset.ToLocalTime(true); }
internal static void ConvertToNative(ref DateTimeOffset managedDTO, out DateTimeNative dateTime) { long utcTicks = managedDTO.UtcTicks; dateTime.UniversalTime = utcTicks - 504911232000000000L; }