Skip to content

Commit

Permalink
refactor: use a negative offset to make clear what we're returning
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Sep 28, 2022
1 parent 062fef4 commit 0d36728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Uuid/Util.php
Expand Up @@ -158,7 +158,7 @@ public static function getTimeBytesForUnixEpoch(DateTimeInterface $dateTime): st
{
if (PHP_INT_SIZE >= 8) {
/** @var non-empty-string */
return substr(pack('J*', intdiv((int) $dateTime->format('Uu'), 1000)), 2);
return substr(pack('J*', intdiv((int) $dateTime->format('Uu'), 1000)), -6);
}

/** @var non-empty-string */
Expand Down

0 comments on commit 0d36728

Please sign in to comment.