Commit 8f7d1ed5 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleaut32: Fixed time outputing for dates before 1899 in VarBstrFromDate.

parent b6a7cc91
......@@ -4951,6 +4951,7 @@ static void test_VarBstrFromDate(void)
BSTR_DATE(365.25, "12/30/1900 6:00:00 AM");
BSTR_DATE(1461.0, "12/31/1903");
BSTR_DATE(1461.5, "12/31/1903 12:00:00 PM");
BSTR_DATE(-49192.24, "4/24/1765 5:45:36 AM");
todo_wine { BSTR_DATE(-657434.0, "1/1/100"); }
BSTR_DATE(2958465.0, "12/31/9999");
......
......@@ -6619,7 +6619,7 @@ HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbst
if (whole == 0.0)
dwFlags |= VAR_TIMEVALUEONLY;
else if (partial < 1e-12)
else if (partial > -1e-12 && partial < 1e-12)
dwFlags |= VAR_DATEVALUEONLY;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment