I think the format is one which we want to commonly display in various places in the portal (such as the download screen, see https://github.com/aodn/aodn-portal/pull/909#commitcomment-5277284) so I would say that it should be defined elsewhere.

There already exists https://github.com/aodn/aodn-portal/blob/master/web-app/js/portal/utils/TimeUtil.js which interesting contains a function `_toUtcIso8601DateString()` - maybe that can be adapted (or a new function added which takes a single parameter of the required type)?