fix timeformat
moved shell script to python