From a11fcc3231f072731a3ae0c155e4ed7471ddb27d Mon Sep 17 00:00:00 2001 From: David Tsay Date: Wed, 17 Apr 2024 11:32:10 -0700 Subject: [PATCH] return reactive isUTCBased --- src/plugins/timeConductor/useTimeSystem.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/timeConductor/useTimeSystem.js b/src/plugins/timeConductor/useTimeSystem.js index 982f848008..2b97d2b307 100644 --- a/src/plugins/timeConductor/useTimeSystem.js +++ b/src/plugins/timeConductor/useTimeSystem.js @@ -34,7 +34,8 @@ const DEFAULT_DURATION_FORMATTER = 'duration'; * observeTimeSystem: () => void, * timeSystemKey: import('vue').Ref, * timeSystemFormatter: import('vue').Ref<() => void>, - * timeSystemDurationFormatter: import('vue').Ref<() => void> + * timeSystemDurationFormatter: import('vue').Ref<() => void>, + * isTimeSystemUTCBased: import('vue').Ref * }} */ export function useTimeSystem(openmct, options) { @@ -47,6 +48,7 @@ export function useTimeSystem(openmct, options) { const timeSystemDurationFormatter = ref( getFormatter(openmct, currentTimeSystem.durationFormat || DEFAULT_DURATION_FORMATTER) ); + const isTimeSystemUTCBased = ref(currentTimeSystem.isUTCBased); onBeforeUnmount(() => stopObservingTimeSystem?.()); @@ -62,13 +64,15 @@ export function useTimeSystem(openmct, options) { openmct, timeSystem.durationFormat || DEFAULT_DURATION_FORMATTER ); + isTimeSystemUTCBased.value = timeSystem.isUTCBased; } return { observeTimeSystem, timeSystemKey, timeSystemFormatter, - timeSystemDurationFormatter + timeSystemDurationFormatter, + isTimeSystemUTCBased }; }