Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Note: filing on behalf of Monty.
<montywi> Basically, mroonga only supports date and datetime after 1900
<elenst> is it all?
<montywi> yes, as far as I can see. This is on freebsd and osx. (Others seem to work, but just by luck as I said...)
The reason is in how mroonga stores datetimes:
In TimeConverter::tm_to_time_gm() there is this code:
time_t sec_t = mktime(time);
On MacOSX this returns -1 if year < 0. On Linux it returns number of seconds since 1900, even if year < 0.
The reason year < 0, is that mroonga stores in year the value of 'real_year - 1900'.
Fix:
- Change storage format in Mroonga of datetime and date to store exact date as a number (like MariaDB does), not seconds from 1900-01-01.