Given that we have an existing datetime library, could we maybe move reformatISO into it so that we can concentrate time conversion code there? We will definitely be revisiting this and it will be useful not to have to chase it all over the place.