Bug 1035763 -- Support 24 hour time format

The string 'totally custom' now occurs 3 times in this function. We should store it in a variable and pass that around instead.