Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Uuid.php

function Uuid::fromDateTime

Creates a UUID from a DateTimeInterface instance

Parameters

DateTimeInterface $dateTime The date and time:

Hexadecimal|null $node A 48-bit number representing the hardware: address

int|null $clockSeq A 14-bit number used to help avoid duplicates: that could arise when the clock is set backwards in time or if the node ID changes

Return value

UuidInterface A UuidInterface instance that represents a version 1 UUID created from a DateTimeInterface instance

File

vendor/ramsey/uuid/src/Uuid.php, line 510

Class

Uuid
Uuid provides constants and static methods for working with and generating UUIDs

Namespace

Ramsey\Uuid

Code

public static function fromDateTime(DateTimeInterface $dateTime, ?Hexadecimal $node = null, ?int $clockSeq = null) : UuidInterface {
    return self::getFactory()->fromDateTime($dateTime, $node, $clockSeq);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal