warframe-worldstate-parser 4.6.0 → 4.6.1

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.
@@ -23,8 +23,9 @@ function getCurrentMidrathCycle() {
23
23
  const nightDuration = 16 * 60 * 1000; // 16 minutes in milliseconds
24
24
  const totalDuration = dayDuration + nightDuration;
25
25
 
26
- const now = new Date();
27
- const elapsedInCycle = (now.getTime() - 222000) % totalDuration;
26
+ const refPoint = Date.parse('2025-08-07T16:05:29Z');
27
+ const now = Date.now();
28
+ const elapsedInCycle = (now - refPoint) % totalDuration;
28
29
  const isDay = elapsedInCycle < dayDuration;
29
30
 
30
31
  let phase = {
@@ -41,7 +42,7 @@ function getCurrentMidrathCycle() {
41
42
  };
42
43
  }
43
44
 
44
- const activation = new Date(now.getTime() - (phase.duration - phase.remaining));
45
+ const activation = new Date(now - (phase.duration - phase.remaining));
45
46
  const expiry = new Date(activation.getTime() + phase.duration);
46
47
  const timeLeft = timeDeltaToString(phase.remaining);
47
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warframe-worldstate-parser",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "An Open parser for Warframe's Worldstate in Javascript",
5
5
  "keywords": [
6
6
  "warframe-worldstate",