Untangle the time formatting functions a bit