Move time formatting logic out of camera.js