oleaut32: Ignore milliseconds in VarDateFromUdate implementation.
This commit is contained in:
parent
5f26c60982
commit
1f7a07ebe3
|
@ -1506,8 +1506,7 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
|
|||
|
||||
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_LASTSAVE_DTM, &varresult, V_VT(&var));
|
||||
ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
|
||||
/* FIXME: Off by one second */
|
||||
todo_wine ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult));
|
||||
ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult));
|
||||
VariantClear(&varresult);
|
||||
VariantClear(&var);
|
||||
|
||||
|
|
|
@ -1646,6 +1646,9 @@ static void test_VarDateFromUdate(void)
|
|||
UD2T(31,12,9999,0,0,0,0,0,0,0,S_OK,2958465.0); /* 31 Dec 9999 - Max */
|
||||
UD2T(1,1,10000,0,0,0,0,0,0,0,E_INVALIDARG,0.0); /* > 31 Dec 9999 => err */
|
||||
|
||||
UD2T(30,12,1899,0,0,0,0,0,0,0,S_OK,0.0); /* 30 Dec 1899 0:00:00 */
|
||||
UD2T(30,12,1899,0,0,0,999,0,0,0,S_OK,0.0); /* Ignore milliseconds */
|
||||
|
||||
UD2T(1,1,1980,18,1,16,0,2,1,0,S_OK,29221.75087962963); /* 6:18:02 PM */
|
||||
todo_wine UD2T(0,1,1980,42,1,16,0,2,1,0,S_OK,29221.75087962963); /* Test rolled hours */
|
||||
todo_wine UD2T(1,1,1980,17,61,16,0,2,1,0,S_OK,29221.75087962963); /* Test rolled minutes */
|
||||
|
|
|
@ -1388,7 +1388,6 @@ HRESULT WINAPI VarDateFromUdateEx(UDATE *pUdateIn, LCID lcid, ULONG dwFlags, DAT
|
|||
dateVal += ud.st.wHour / 24.0;
|
||||
dateVal += ud.st.wMinute / 1440.0;
|
||||
dateVal += ud.st.wSecond / 86400.0;
|
||||
dateVal += ud.st.wMilliseconds / 86400000.0;
|
||||
|
||||
TRACE("Returning %g\n", dateVal);
|
||||
*pDateOut = dateVal;
|
||||
|
|
Loading…
Reference in New Issue