function getRolloverTimeFormat({ rolloverTimeFormat, utcTime, timeFrame }) {
if (rolloverTimeFormat) return timeFormat(utcTime, rolloverTimeFormat);
switch (timeFrame) {
case 'millis':
return timeFormat(utcTime, '%b %e, %Y %H:%M:%S.%L');
case 'seconds':
return timeFormat(utcTime, '%b %e, %Y %H:%M:%S');
case 'less-than-a-day':
return timeFormat(utcTime, '%b %e, %Y %I:%M%p');
case 'four-days':
return timeFormat(utcTime, '%b %e, %Y %I:%M%p');
default:
return timeFormat(utcTime, '%b %e, %Y');
}
}