fix forget-to-return
add newline
fix mistake that I've forgotten to convert to string
execute with python2
fix reference
fix wrong parsing

swap the arguments of split()

strip input line to avoid the error which happens on striptime()

use datetime.strptime() instead of date.strptime() (there's no such method!
correct logic to set generated_at when no input file given