summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mysql_types.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mysql_types.cpp b/lib/mysql_types.cpp
index b96fdaa..4480d23 100644
--- a/lib/mysql_types.cpp
+++ b/lib/mysql_types.cpp
@@ -193,11 +193,11 @@ namespace MyGrate::MySQL {
typename Type<MYSQL_TYPE_DATE>::C
Type<MYSQL_TYPE_DATE>::read(RawDataReader &, RawDataReader & data)
{
- auto dint {data.readValue<uint32_t, 3>()};
+ const auto dint {data.readValue<uint32_t, 3>()};
Date d {};
- d.day = bitslice<6>(dint, 0);
- d.month = bitslice<4>(dint, 6);
- d.year = bitslice<14>(dint, 10);
+ d.day = bitslice<5>(dint, 0);
+ d.month = bitslice<4>(dint, 5);
+ d.year = bitslice<14>(dint, 9);
return d;
}