[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - connectivity/source
Wastack
btomi96 at gmail.com
Fri Jul 15 18:26:32 UTC 2016
connectivity/source/drivers/firebird/ResultSet.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit f9393f84d539814574b594e173367335fe0c42e8
Author: Wastack <btomi96 at gmail.com>
Date: Mon Jul 11 17:25:58 2016 +0200
tdf#91324 GSoC adapt struct tm correctly
Change-Id: I645ebe888186e550b95dd072e063260bc69aa178
Reviewed-on: https://gerrit.libreoffice.org/27120
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
(cherry picked from commit 88346f606a16865bcf7492f67a7207d0078787a1)
Reviewed-on: https://gerrit.libreoffice.org/27235
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 89145f4..b4d2472 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -480,10 +480,14 @@ DateTime OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT
struct tm aCTime;
isc_decode_timestamp(&aISCTimestamp, &aCTime);
- // first field is nanoseconds -- not supported in firebird or struct tm.
- // last field denotes UTC (true) or unknown (false)
- return DateTime(0, aCTime.tm_sec, aCTime.tm_min, aCTime.tm_hour, aCTime.tm_mday,
- aCTime.tm_mon, aCTime.tm_year, false);
+ return DateTime(0, //nanoseconds, not supported
+ aCTime.tm_sec,
+ aCTime.tm_min,
+ aCTime.tm_hour,
+ aCTime.tm_mday,
+ aCTime.tm_mon + 1, // tm is from 0 to 11
+ aCTime.tm_year + 1900, //tm_year is the years since 1900
+ false); // denotes UTC (true), or unknown (false)
}
else
{
More information about the Libreoffice-commits
mailing list