Permalink
Browse files

Work around bug in timestamp conversion in Firebird backend.

tm_isdst field of the returned struct tm was not set correctly, work around it
by always setting it to -1 until http://tracker.firebirdsql.org/browse/CORE-3877
is fixed.

Signed-off-by: Vadim Zeitlin <vz-soci@zeitlins.org>
  • Loading branch information...
vadz committed Jun 25, 2012
1 parent ce9657b commit a1251afc295515b80d9076761c2d3f07d2fb8ae1
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/backends/firebird/standard-into-type.cpp
@@ -110,6 +110,12 @@ void firebird_standard_into_type_backend::exchangeData()
case x_stdtm:
tmDecode(var->sqltype,
buf_, static_cast<std::tm*>(data_));
// isc_decode_timestamp() used by tmDecode() incorrectly sets
// tm_isdst to 0 in the struct that it creates, see
// http://tracker.firebirdsql.org/browse/CORE-3877, work around it
// by pretending the DST is actually unknown.
static_cast<std::tm*>(data_)->tm_isdst = -1;
break;
// cases that require special handling

0 comments on commit a1251af

Please sign in to comment.