diff --git a/client/src/common/utils/__tests__/dateConfig.test.js b/client/src/common/utils/__tests__/dateConfig.test.js index 031205036..9a98719ab 100644 --- a/client/src/common/utils/__tests__/dateConfig.test.js +++ b/client/src/common/utils/__tests__/dateConfig.test.js @@ -64,7 +64,7 @@ describe('test formatDisplay handles partial secs', () => { describe('test string from formatDisplay function with hidezero', () => { it('test with null values', () => { - const t = { val: null, result: '00:00:00' }; + const t = { val: null, result: '00:00' }; expect(formatDisplay(t.val, true)).toBe(t.result); }); diff --git a/client/src/common/utils/dateConfig.js b/client/src/common/utils/dateConfig.js index 1f3527cdf..cb793812c 100644 --- a/client/src/common/utils/dateConfig.js +++ b/client/src/common/utils/dateConfig.js @@ -14,7 +14,7 @@ const mth = 1000 * 60 * 60; // millis to hours */ export function formatDisplay(seconds, hideZero = false) { if (typeof seconds !== 'number') { - return '00:00:00'; + return hideZero ? '00:00' : '00:00:00'; } // add an extra 0 if necessary