Fixed nasty time.py bugs

Lets see how everything turns out on travis-ci