summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-28 00:43:19 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-15 16:57:34 +0200
commita2d5b585957e28b2e8a4a0f6e536a1d7c9c02a65 (patch)
tree57e1f8c574d7b0b4b950b51c88db29952bc11584 /connectivity
parent451ec0f1b37acfd09226ff61da2317de3f5b76ac (diff)
i#108348 API CHANGE: add IsUTC to css.util.DateTime etc.
Add IsUTC member to: com.sun.star.util.DateTime com.sun.star.util.DateTimeRange com.sun.star.util.Time Add new stucts with explicit time zones: com.sun.star.util.DateTimeWithTimezone com.sun.star.util.DateWithTimezone com.sun.star.util.TimeWithTimezone Adapt the sax::Converter to read/write timezones, and fix the unit test. Everything else just uses default (no time zone), this commit is just to fix the API. STRUCT: /UCR/com/sun/star/util/DateTime nFields1 = 7 != nFields2 = 8 Registry2 contains 1 more fields STRUCT: /UCR/com/sun/star/util/DateTimeRange nFields1 = 14 != nFields2 = 15 Registry2 contains 1 more fields STRUCT: /UCR/com/sun/star/util/Time nFields1 = 4 != nFields2 = 5 Registry2 contains 1 more fields Conflicts: sc/source/filter/oox/unitconverter.cxx Reviewed-on: https://gerrit.libreoffice.org/4833 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 652ccbdf3111766fadc379a8cf4650b744e1e19c) i#108348: fix TimeZone -> Timezone in struct names (cherry picked from commit 604aae1fd240254fe851d93dc35b5408bd13296c) Signed-off-by: Michael Stahl <mstahl@redhat.com> Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu> Signed-off-by: Michael Meeks <michael.meeks@suse.com> Conflicts: forms/source/xforms/convert.cxx offapi/type_reference/offapi.rdb reportdesign/source/core/sdr/RptObject.cxx sc/source/filter/oox/unitconverter.cxx (cherry picked from commit dd780228cca25dc818ca7fdb628ff607c109618e)
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbconversion.cxx5
-rw-r--r--connectivity/source/drivers/file/FDateFunctions.cxx10
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx5
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx5
4 files changed, 16 insertions, 9 deletions
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 73b76385fa9f..0b04dbd951e4 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -102,7 +102,8 @@ namespace dbtools
utl::Date aDate(_rDateTime.Day,_rDateTime.Month,_rDateTime.Year);
OUStringBuffer aTemp(toDateString(aDate));
aTemp.appendAscii(" ");
- utl::Time aTime(_rDateTime.NanoSeconds,_rDateTime.Seconds,_rDateTime.Minutes,_rDateTime.Hours);
+ utl::Time const aTime(_rDateTime.NanoSeconds, _rDateTime.Seconds,
+ _rDateTime.Minutes, _rDateTime.Hours, _rDateTime.IsUTC);
aTemp.append( toTimeString(aTime) );
return aTemp.makeStringAndClear();
}
@@ -452,7 +453,7 @@ namespace dbtools
aTime = toTime( _sSQLString.copy( nSeparation ) );
return utl::DateTime(aTime.NanoSeconds, aTime.Seconds, aTime.Minutes, aTime.Hours,
- aDate.Day, aDate.Month, aDate.Year);
+ aDate.Day, aDate.Month, aDate.Year, false);
}
//-----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx
index a24c46d5c153..1bea9fec099f 100644
--- a/connectivity/source/drivers/file/FDateFunctions.cxx
+++ b/connectivity/source/drivers/file/FDateFunctions.cxx
@@ -263,7 +263,9 @@ ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const
return ORowSetValue();
Time aCurTime( Time::SYSTEM );
- return ::com::sun::star::util::Time(aCurTime.GetNanoSec(),aCurTime.GetSec(),aCurTime.GetMin(),aCurTime.GetHour());
+ return ::com::sun::star::util::Time(aCurTime.GetNanoSec(),
+ aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(),
+ false);
}
//------------------------------------------------------------------
ORowSetValue OOp_Now::operate(const ::std::vector<ORowSetValue>& lhs) const
@@ -272,8 +274,10 @@ ORowSetValue OOp_Now::operate(const ::std::vector<ORowSetValue>& lhs) const
return ORowSetValue();
DateTime aCurTime( DateTime::SYSTEM );
- return ::com::sun::star::util::DateTime(aCurTime.GetNanoSec(),aCurTime.GetSec(),aCurTime.GetMin(),aCurTime.GetHour(),
- aCurTime.GetDay(),aCurTime.GetMonth(),aCurTime.GetYear());
+ return ::com::sun::star::util::DateTime(aCurTime.GetNanoSec(),
+ aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(),
+ aCurTime.GetDay(), aCurTime.GetMonth(), aCurTime.GetYear(),
+ false);
}
//------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index fec060d556c1..fbb1b597a0b0 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -418,7 +418,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex )
OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
else
m_bWasNull = sal_True;
- return Time(0,aTime.second,aTime.minute,aTime.hour);
+ return Time(0, aTime.second,aTime.minute,aTime.hour, false);
}
// -------------------------------------------------------------------------
@@ -436,7 +436,8 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( 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);
else
m_bWasNull = sal_True;
- return DateTime(aTime.fraction,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
+ return DateTime(aTime.fraction, aTime.second, aTime.minute, aTime.hour,
+ aTime.day, aTime.month, aTime.year, false);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 211ba70703ee..9d77984501db 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -651,7 +651,7 @@ Time OResultSet::impl_getTime( sal_Int32 columnIndex ) throw(SQLException, Runti
TIME_STRUCT aTime = impl_getValue< TIME_STRUCT > ( columnIndex,
m_pStatement->getOwnConnection()->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME );
- return Time(0,aTime.second,aTime.minute,aTime.hour);
+ return Time(0, aTime.second,aTime.minute,aTime.hour, false);
}
Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
@@ -669,7 +669,8 @@ DateTime OResultSet::impl_getTimestamp( sal_Int32 columnIndex ) throw(SQLExcepti
aTime.hour,
aTime.day,
aTime.month,
- aTime.year);
+ aTime.year,
+ false);
}
DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{