Description:
The documentation for the UNIX_TIMESTAMP() function does not include formats with HHMMSS as part of the valid number formats that are accepted.
12.7 Date and Time Functions
https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_unix-timesta...
If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since '1970-01-01 00:00:00' UTC. date may be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or YYYYMMDD, optionally including a fractional seconds part.
How to repeat:
mysql> SELECT UNIX_TIMESTAMP(170312165917), UNIX_TIMESTAMP(20170312165917)\G
*************************** 1. row ***************************
UNIX_TIMESTAMP(170312165917): 1489352357
UNIX_TIMESTAMP(20170312165917): 1489352357
mysql> SELECT NOW(), NOW()+0, UNIX_TIMESTAMP(NOW()+0)\G
*************************** 1. row ***************************
NOW(): 2017-03-12 19:04:24
NOW()+0: 20170312190424
UNIX_TIMESTAMP(NOW()+0): 1489359864
mysql> SELECT UNIX_TIMESTAMP(170312165917.123), UNIX_TIMESTAMP(20170312165917.123)\G
*************************** 1. row ***************************
UNIX_TIMESTAMP(170312165917.123): 1489352357.123
UNIX_TIMESTAMP(20170312165917.123): 1489352357.123
mysql> SELECT NOW(3), NOW(3)+0, UNIX_TIMESTAMP(NOW(3)+0)\G
*************************** 1. row ***************************
NOW(3): 2017-03-12 19:07:51.016
NOW(3)+0: 20170312190751.016
UNIX_TIMESTAMP(NOW(3)+0): 1489360071.016
Suggested fix:
Update the documentation to include YYMMDDHHMMSS and YYYYMMDDHHMMSS (with optional fractional part) as valid arguments to the UNIX_TIMESTAMP() function.