warframe-worldstate-parser 4.6.0 → 4.6.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.
|
@@ -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
|
|
27
|
-
const
|
|
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
|
|
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
|
|