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

Breadcrumb

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

function TimeConverterInterface::calculateTime

Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for RFC 4122 variant UUIDs

@link http://tools.ietf.org/html/rfc4122#section-4.2.2 RFC 4122, ยง 4.2.2: Generation Details

@psalm-pure

Parameters

string $seconds A string representation of the number of seconds: since the Unix epoch for the time to calculate

string $microseconds A string representation of the micro-seconds: associated with the time to calculate

Return value

Hexadecimal The full UUID timestamp as a Hexadecimal value

4 methods override TimeConverterInterface::calculateTime()
BigNumberTimeConverter::calculateTime in vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php
Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for RFC 4122 variant UUIDs
GenericTimeConverter::calculateTime in vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php
Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for RFC 4122 variant UUIDs
PhpTimeConverter::calculateTime in vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php
Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for RFC 4122 variant UUIDs
UnixTimeConverter::calculateTime in vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php
Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for RFC 4122 variant UUIDs

File

vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php, line 44

Class

TimeConverterInterface
A time converter converts timestamps into representations that may be used in UUIDs

Namespace

Ramsey\Uuid\Converter

Code

public function calculateTime(string $seconds, string $microseconds) : Hexadecimal;

API Navigation

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