In MySQL and MariaDB, the TIME_TO_SEC function converts a time value to the number of seconds past midnight.
However, in MySQL it returns an integer value, whereas in MariaDB it returns a double.
MySQL:
-- Get seconds past midnight SELECT TIME_TO_SEC('12:16:46.123456'); /* 44206 */
MariaDB:
-- Get seconds past midnight (includes microseconds) SELECT TIME_TO_SEC('12:16:46.123456'); /* 44206.123456 */ -- Get seconds only similar to MySQL SELECT CAST(TIME_TO_SEC('12:16:46.123456') AS UNSIGNED); /* 44206 */
For more information, see MySQL to MariaDB Migration.