baseui 10.9.1 → 10.9.2

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.
@@ -44,10 +44,12 @@ class TimezonePicker extends React.Component {
44
44
  }
45
45
  }
46
46
 
47
+ const offsetMinutes = offset * 60;
47
48
  timezones.push({
48
49
  id: zoneName,
49
50
  label,
50
- offset
51
+ // offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
52
+ offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
51
53
  });
52
54
  } catch (error) {
53
55
  // Ignores timezones that are not available within a user's browser/operating system
@@ -98,10 +98,12 @@ var TimezonePicker = /*#__PURE__*/function (_React$Component) {
98
98
  }
99
99
  }
100
100
 
101
+ var offsetMinutes = offset * 60;
101
102
  timezones.push({
102
103
  id: zoneName,
103
104
  label: label,
104
- offset: offset
105
+ // offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
106
+ offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
105
107
  });
106
108
  } catch (error) {
107
109
  // Ignores timezones that are not available within a user's browser/operating system
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "10.9.1",
3
+ "version": "10.9.2",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -107,10 +107,12 @@ var TimezonePicker = /*#__PURE__*/function (_React$Component) {
107
107
  }
108
108
  }
109
109
 
110
+ var offsetMinutes = offset * 60;
110
111
  timezones.push({
111
112
  id: zoneName,
112
113
  label: label,
113
- offset: offset
114
+ // offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
115
+ offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
114
116
  });
115
117
  } catch (error) {
116
118
  // Ignores timezones that are not available within a user's browser/operating system
@@ -73,10 +73,13 @@ class TimezonePicker extends React.Component<
73
73
  }
74
74
  }
75
75
 
76
+ const offsetMinutes = offset * 60;
77
+
76
78
  timezones.push({
77
79
  id: zoneName,
78
80
  label,
79
- offset,
81
+ // offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
82
+ offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1,
80
83
  });
81
84
  } catch (error) {
82
85
  // Ignores timezones that are not available within a user's browser/operating system
@@ -22,6 +22,11 @@ export type TimezonePickerStateT = {
22
22
  export type TimezoneT = {
23
23
  id: string,
24
24
  label: string,
25
+ /**
26
+ * The difference, in minutes, between a UTC date, and a date in the indicated time zone.
27
+ * Positive values indicate hours behind UTC, negative values indicate hours ahead.
28
+ * This aligns with Date.getTimezoneOffset()
29
+ */
25
30
  offset: number,
26
31
  };
27
32
  export type TimezonePickerPropsT = {