Improve teaching time conversion. Fixes #54.