Update Date and Time Settings to include UTC/offset label

Label updates allow the user to easily understand
the expectation for entering time by using specific
label text for "24 hour time" and removing parenthesis
from the helper text as parenthesis are not needed to
in the input field.

UTC/offset is displayed based on user preference.

Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I41f98d9d16f0a4a81af39ce9b25768a1c0b89f08
diff --git a/src/components/Mixins/LocalTimezoneLabelMixin.js b/src/components/Mixins/LocalTimezoneLabelMixin.js
new file mode 100644
index 0000000..0f96a45
--- /dev/null
+++ b/src/components/Mixins/LocalTimezoneLabelMixin.js
@@ -0,0 +1,14 @@
+import { format } from 'date-fns-tz';
+
+const LocalTimezoneLabelMixin = {
+  methods: {
+    localOffset() {
+      const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
+      const shortTz = this.$options.filters.shortTimeZone(new Date());
+      const pattern = `'${shortTz}' O`;
+      return format(new Date(), pattern, { timezone }).replace('GMT', 'UTC');
+    }
+  }
+};
+
+export default LocalTimezoneLabelMixin;