trait Timestamp
Trait Timestamp.
Methods
Create a Carbon instance from a timestamp and set the timezone (use default one if not specified).
Create a Carbon instance from an timestamp keeping the timezone to UTC.
Create a Carbon instance from a timestamp in milliseconds.
Create a Carbon instance from a timestamp in milliseconds.
Returns a timestamp rounded with the given precision (6 by default).
Returns the milliseconds timestamps used amongst other by Date javascript objects.
Returns the timestamp with millisecond precision.
No description
Details
at line29
staticTimestamp
createFromTimestamp(float|int|string$timestamp,DateTimeZone|string|null$tz =null)
Create a Carbon instance from a timestamp and set the timezone (use default one if not specified).
Timestamp input can be given as int, float or a string containing one or more numbers.
at line43
staticTimestamp
createFromTimestampUTC(float|int|string$timestamp)
Create a Carbon instance from an timestamp keeping the timezone to UTC.
Timestamp input can be given as int, float or a string containing one or more numbers.
at line63
staticTimestamp
createFromTimestampMsUTC(float|int|string$timestamp)
Create a Carbon instance from a timestamp in milliseconds.
Timestamp input can be given as int, float or a string containing one or more numbers.
at line88
staticTimestamp
createFromTimestampMs(float|int|string$timestamp,DateTimeZone|string|null$tz =null)
Create a Carbon instance from a timestamp in milliseconds.
Timestamp input can be given as int, float or a string containing one or more numbers.
at line103
Timestamp
timestamp(float|int|string$unixTimestamp)
Set the instance's timestamp.
Timestamp input can be given as int, float or a string containing one or more numbers.
at line126
float
getPreciseTimestamp(int$precision =6)
Returns a timestamp rounded with the given precision (6 by default).
at line136
float
valueOf()
Returns the milliseconds timestamps used amongst other by Date javascript objects.
at line146
int
getTimestampMs()
Returns the timestamp with millisecond precision.