You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownew \InvalidArgumentException('The start time cannot be greater than the current time');
187
-
}
190
+
if (gmp_cmp($missTime, 0) < 0) {
191
+
thrownew \InvalidArgumentException('The start time cannot be greater than the current time');
192
+
}
193
+
$mask = gmp_init(-1);
194
+
$shifted = gmp_mul(gmp_init(-1), gmp_pow(2, self::MAX_TIMESTAMP_LENGTH)); // -1 << n
195
+
$maxTimeDiff = gmp_xor($mask, $shifted);
196
+
197
+
if (gmp_cmp($missTime, $maxTimeDiff) > 0) {
198
+
thrownew \InvalidArgumentException(
199
+
sprintf('The current microtime (%f) - starttime (%f) is not allowed to exceed -1 ^ (-1 << %d), You can reset the start time to fix this', $missTime, $maxTimeDiff, self::MAX_TIMESTAMP_LENGTH)
thrownew \InvalidArgumentException('The start time cannot be greater than the current time');
208
+
}
190
209
191
-
if ($missTime > $maxTimeDiff && $maxTimeDiff === -1) {
192
-
thrownew \InvalidArgumentException(
193
-
sprintf('The current microtime (%f) - starttime (%f) is not allowed to exceed -1 ^ (-1 << %d), You can reset the start time to fix this', $missTime, $maxTimeDiff, self::MAX_TIMESTAMP_LENGTH)
sprintf('The current microtime (%f) - starttime (%f) is not allowed to exceed -1 ^ (-1 << %d), You can reset the start time to fix this', $missTime, $maxTimeDiff, self::MAX_TIMESTAMP_LENGTH)
215
+
);
216
+
}
217
+
$this->startTime = (string)($second * 1000);
218
+
}
198
219
199
220
return$this;
200
221
}
201
222
202
223
/**
203
224
* Get start timestamp (millisecond), If not set default to 2019-08-08 08:08:08.
0 commit comments