aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Uuid.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-05-07 15:22:25 +0000
committerMario <mario@mariovavti.com>2020-05-07 15:22:25 +0000
commitdbfe748d274f6843fc91a3071df7be45c4ab5b00 (patch)
tree3b59194620f319b16a88dcc2aa5bacbea1c3d188 /vendor/ramsey/uuid/src/Uuid.php
parent4ee809bed6ea023ad9e2888eedd65e083d4c1e3e (diff)
downloadvolse-hubzilla-dbfe748d274f6843fc91a3071df7be45c4ab5b00.tar.gz
volse-hubzilla-dbfe748d274f6843fc91a3071df7be45c4ab5b00.tar.bz2
volse-hubzilla-dbfe748d274f6843fc91a3071df7be45c4ab5b00.zip
composer updates
Diffstat (limited to 'vendor/ramsey/uuid/src/Uuid.php')
-rw-r--r--vendor/ramsey/uuid/src/Uuid.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php
index 38fbd5ed6..f2912b48a 100644
--- a/vendor/ramsey/uuid/src/Uuid.php
+++ b/vendor/ramsey/uuid/src/Uuid.php
@@ -350,8 +350,8 @@ class Uuid implements UuidInterface
throw new UnsupportedOperationException('Not a time-based UUID');
}
- $unixTime = ($this->getTimestamp() - 0x01b21dd213814000) / 1e7;
- $unixTime = number_format($unixTime, 0, '', '');
+ $unixTimeNanoseconds = $this->getTimestamp() - 0x01b21dd213814000;
+ $unixTime = ($unixTimeNanoseconds - $unixTimeNanoseconds % 1e7) / 1e7;
return new DateTime("@{$unixTime}");
}
@@ -676,7 +676,7 @@ class Uuid implements UuidInterface
*/
public static function isValid($uuid)
{
- $uuid = str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid);
+ $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid);
if ($uuid == self::NIL) {
return true;