dce-reactkit 4.2.7 → 4.2.8-beta-timestamp.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "4.2.7",
3
+ "version": "4.2.8-beta-timestamp.2",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -124,7 +124,8 @@ const getTimestampFromTimeInfoInET = (
124
124
 
125
125
  // Build ET ISO string and convert to UTC timestamp
126
126
  const etISOString = `${year}-${mm}-${dd}T${hh}:${min}:00${etOffset}`;
127
- let timestamp = (new Date(etISOString)).getTime();
127
+ const baseTimestamp = (new Date(etISOString)).getTime();
128
+ let timestamp = baseTimestamp;
128
129
 
129
130
  // Heat seek to get the right timestamp
130
131
  const maxOffset = 24 * 60; // 24 hours in minutes
@@ -150,7 +151,7 @@ const getTimestampFromTimeInfoInET = (
150
151
 
151
152
  // Update timestamp
152
153
  const offsetMs = currentOffset * 60 * 1000;
153
- timestamp += offsetMs;
154
+ timestamp = baseTimestamp + offsetMs;
154
155
 
155
156
  // Check timestamp again
156
157
  const newDirection = checkTimestamp({