fix time formatting error on python2.6