@capillarytech/cap-ui-utils 3.0.10 → 3.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/utils/timezone.js CHANGED
@@ -10,9 +10,9 @@ import hasFeatureAccess from "../auth/hasFeatureAccess";
10
10
  * If Abbreviation is not found then return UTC+X:XX format
11
11
  */
12
12
  export const getTimezoneAbbreviation = timezone => {
13
- const tzAbbr = moment.tz(timezone).format('z');
13
+ const tzAbbr = moment.tz(timezone).zoneAbbr();
14
14
  if(tzAbbr.startsWith('+') || tzAbbr.startsWith('-')) {
15
- return `UTC${moment.utcOffset(tzAbbr)}`;
15
+ return `UTC${moment.tz(timezone).format('Z')}`;
16
16
  }
17
17
  return tzAbbr;
18
18
  };