I'm attempting to use moment.js to format Apache log timestamps (
14/Jun/2015:11:05:54 -0700) as proper MySQL
Getting the MySQL
DATETIME format is a breeze. But moment seems to only auto-detect
ISO 8601 formats. My Node.js console output when passing in the Apache log's timestamp into moment:
> moment( '08/Jun/2015:15:03:29' ).format("YYYY-MM-DD HH:mm:ss") 'Invalid date'
NOTE: Changing the Apache log's timestamp format wouldn't work for my case, because I'm working with old log files, not new ones.