[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - connectivity/source

Lionel Elie Mamane lionel at mamane.lu
Fri Jun 28 05:28:58 PDT 2013


 connectivity/source/drivers/jdbc/Timestamp.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f4fcf5464c249fe15d5e8d3dd09df8b377bcd559
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Jun 27 08:51:59 2013 +0200

    fdo#66216 JDBC no fractional second in time format
    
    fractional second allowed in timestamp. But not in time. Don't ask why.
    
    Change-Id: I5415889ab4cf4835b8b0db7363b7d9eb0a332393
    Reviewed-on: https://gerrit.libreoffice.org/4566
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index a1d1bcd..5337330 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -103,7 +103,8 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_
     jvalue args[1];
     // Convert parameters
     OUString sDateStr;
-    sDateStr = ::dbtools::DBTypeConversion::toTimeString(_rOut);
+    // java.sql.Time supports only whole seconds...
+    sDateStr = ::dbtools::DBTypeConversion::toTimeString(_rOut).copy(0, 8);
     args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
 
     // Turn off Java-Call for the constructor


More information about the Libreoffice-commits mailing list