@salesforcedevs/dx-components 1.3.97 → 1.3.98

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": "@salesforcedevs/dx-components",
3
- "version": "1.3.97",
3
+ "version": "1.3.98",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -40,5 +40,5 @@
40
40
  "eventsourcemock": "^2.0.0",
41
41
  "luxon": "^3.1.0"
42
42
  },
43
- "gitHead": "6b12a153272eab5f429ddc8921cbcbf435069e02"
43
+ "gitHead": "2c2956a3b95fe51168d1cde88079f03bc077e35a"
44
44
  }
@@ -60,22 +60,7 @@ export function sortSplittedPostsByMonth(postsByMonth: any) {
60
60
  return sortedPostsByMonth;
61
61
  }
62
62
 
63
- export function convertForDaylightSavings(
64
- date: string,
65
- zone: string = "local"
66
- ) {
67
- if (!hasDST(zone)) {
68
- return DateTime.fromISO(date).setZone(zone);
69
- }
70
-
71
- return DateTime.fromISO(date).setZone(zone).isInDST
72
- ? DateTime.fromISO(date).setZone(zone)
73
- : DateTime.fromISO(date).setZone(zone).plus({ hour: 1 });
74
- }
75
-
76
- export function hasDST(zone: string = "local") {
77
- return (
78
- DateTime.fromISO("2022-01-01").setZone(zone).isInDST !==
79
- DateTime.fromISO("2022-06-01").setZone(zone).isInDST
80
- );
63
+ export function convertForDaylightSavings(utcIsoString: string) {
64
+ const utcDate = DateTime.fromISO(utcIsoString, { zone: "utc" });
65
+ return utcDate.toLocal();
81
66
  }