diff --git a/CefSharp.Core.Runtime/Internals/TypeConversion.h b/CefSharp.Core.Runtime/Internals/TypeConversion.h
index 78e1d4c78..723641952 100644
--- a/CefSharp.Core.Runtime/Internals/TypeConversion.h
+++ b/CefSharp.Core.Runtime/Internals/TypeConversion.h
@@ -300,12 +300,7 @@ namespace CefSharp
return gcnew NavigationEntry(current, DateTime::MinValue, nullptr, -1, nullptr, nullptr, (TransitionType)-1, nullptr, false, false, sslStatus);
}
- //TODO: Issue #4234
- auto baseTime = entry->GetCompletionTime();
- CefTime time;
- cef_time_from_basetime(baseTime, &time);
-
- DateTime completionTime = CefTimeUtils::ConvertCefTimeToDateTime(time.GetDoubleT());
+ DateTime completionTime = CefTimeUtils::FromBaseTimeToDateTime(entry->GetCompletionTime().val);
auto ssl = entry->GetSSLStatus();
X509Certificate2^ sslCertificate;
diff --git a/CefSharp/Internals/CefTimeUtils.cs b/CefSharp/Internals/CefTimeUtils.cs
index a07aa8c55..a4af5bedb 100644
--- a/CefSharp/Internals/CefTimeUtils.cs
+++ b/CefSharp/Internals/CefTimeUtils.cs
@@ -32,6 +32,20 @@ namespace CefSharp.Internals
return DateTime.FromFileTime(val * 10);
}
+ ///
+ /// Converts from CefBaseTime to DateTime
+ ///
+ ///
+ /// Represents a wall clock time in UTC. Values are not guaranteed to be monotonically
+ /// non-decreasing and are subject to large amounts of skew. Time is stored internally
+ /// as microseconds since the Windows epoch (1601).
+ ///
+ /// returns a of
+ public static DateTime FromBaseTimeToDateTime(long val)
+ {
+ return DateTime.FromFileTime(val * 10);
+ }
+
public static DateTime ConvertCefTimeToDateTime(double epoch)
{
if (epoch == 0)