fix usage of time class, fixes #58