mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
238306a6ed
commit
549867dad3
@@ -169,7 +169,7 @@ void Binder::bind(std::size_t pos, const DateTime& val, Direction dir, const Whe
|
||||
mt.hour = val.hour();
|
||||
mt.minute = val.minute();
|
||||
mt.second = val.second();
|
||||
mt.second_part = val.millisecond();
|
||||
mt.second_part = val.millisecond() * 1000 + val.microsecond();
|
||||
|
||||
mt.time_type = MYSQL_TIMESTAMP_DATETIME;
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ bool Extractor::extract(std::size_t pos, DateTime& val)
|
||||
if (!realExtractFixed(pos, MYSQL_TYPE_DATETIME, &mt))
|
||||
return false;
|
||||
|
||||
val.assign(mt.year, mt.month, mt.day, mt.hour, mt.minute, mt.second, mt.second_part, 0);
|
||||
val.assign(mt.year, mt.month, mt.day, mt.hour, mt.minute, mt.second, mt.second_part / 1000, mt.second_part % 1000);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user