Documentation

DegradedTimeConverter extends BigNumberTimeConverter
in package

Previously used to integrate moontoast/math as a bignum arithmetic library, BigNumberTimeConverter is deprecated in favor of GenericTimeConverter

Tags
deprecated

DegradedTimeConverter is no longer necessary for converting time on 32-bit systems. Transition to GenericTimeConverter.

psalm-immutable

Table of Contents

$converter  : TimeConverterInterface
__construct()  : mixed
calculateTime()  : Hexadecimal
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
convertTime()  : Time
Converts a timestamp extracted from a UUID to a Unix timestamp

Properties

Methods

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

public calculateTime(string $seconds, string $microseconds) : Hexadecimal
Parameters
$seconds : string

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

$microseconds : string

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

Return values
Hexadecimal

The full UUID timestamp as a Hexadecimal value

convertTime()

Converts a timestamp extracted from a UUID to a Unix timestamp

public convertTime(Hexadecimal $uuidTimestamp) : Time
Parameters
$uuidTimestamp : Hexadecimal

A hexadecimal representation of a UUID timestamp; a UUID timestamp is a count of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582.

Return values
Time

An instance of Time

Search results