diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-29 15:26:08 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-07-31 13:32:58 +0000 |
commit | 2f9c340b4f8f54872eb97880d03c802a1620a1b6 (patch) | |
tree | ad310c957df0ddcc9065e62ce80d6b89ef297f08 | |
parent | fd424dd6fcf367da671b6d31a64465cb0751a026 (diff) |
fdo#67387 skip separating space between date and time in timestamp
Change-Id: I3c38d179f8b2f59e79cd889fa88f4582f650c09e
Reviewed-on: https://gerrit.libreoffice.org/5166
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r-- | connectivity/source/commontools/dbconversion.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 0b04dbd951e4..847f45fc5596 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -450,7 +450,13 @@ namespace dbtools utl::Time aTime; sal_Int32 nSeparation = _sSQLString.indexOf( ' ' ); if ( -1 != nSeparation ) + { + const sal_Unicode *p = _sSQLString.getStr() + nSeparation; + const sal_Unicode *const begin = p; + for(;isspace(*p);++p); + nSeparation += p - begin; aTime = toTime( _sSQLString.copy( nSeparation ) ); + } return utl::DateTime(aTime.NanoSeconds, aTime.Seconds, aTime.Minutes, aTime.Hours, aDate.Day, aDate.Month, aDate.Year, false); |