Kaydet (Commit) 9bb18700 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#34309 odbc fractional seconds are in billionths

üst d82d2031
...@@ -471,7 +471,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) ...@@ -471,7 +471,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime); OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
else else
m_bWasNull = sal_True; m_bWasNull = sal_True;
return DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year); return DateTime((sal_uInt16)aTime.fraction/ODBC_FRACTION_UNITS_PER_HSECOND,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -653,7 +653,7 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLExc ...@@ -653,7 +653,7 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLExc
&aTime,sizeof aTime); &aTime,sizeof aTime);
return (&aValue == &m_aEmptyValue) return (&aValue == &m_aEmptyValue)
? ?
DateTime(static_cast<sal_uInt16>(aTime.fraction*1000),aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year) DateTime(static_cast<sal_uInt16>(aTime.fraction/ODBC_FRACTION_UNITS_PER_HSECOND),aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year)
: :
(DateTime)aValue; (DateTime)aValue;
} }
......
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