Core - Migrate from CefTime to CefBaseTime (Execution/Binding)

- Convert more of the methods used by JavaScript binding/execution
- Fix naming of FromDateTimeToBaseTime

Issue #4234
This commit is contained in:
Alex Maitland
2022-09-06 15:07:09 +10:00
parent 1a8c7cf09e
commit 416ed308c2
11 changed files with 218 additions and 130 deletions
@@ -36,7 +36,7 @@ namespace CefSharp
else if (IsCefTime(list, index))
{
auto cefTime = GetCefTime(list, index);
result = ConvertCefTimeToDateTime(cefTime);
result = CefTimeUtils::FromBaseTimeToDateTime(cefTime.val);
}
else if (IsJsCallback(list, index) && javascriptCallbackFactory != nullptr)
{
@@ -81,16 +81,6 @@ namespace CefSharp
return result;
}
DateTime ConvertCefTimeToDateTime(CefTime time)
{
auto epoch = time.GetDoubleT();
if (epoch == 0)
{
return DateTime::MinValue;
}
return DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(epoch).ToLocalTime();
}
}
}
}