Time
implements
JsonSerializable
Table of Contents
Interfaces
- JsonSerializable
Methods
-
__construct()
: mixed
-
__toString()
: string
-
getFormat()
: string|null
-
getOffset()
: int
-
getRenderFormat()
: string
-
getTimestamp()
: int
-
isCorrect()
: bool
-
jsonSerialize()
: mixed
-
serialize()
: string
-
toServerTime()
: DateTime
-
toSystemObject()
: DateTime
-
toUserTime()
: DateTime
-
tryMakeCorrectFormat()
: string
__construct()
public
__construct(string $timeFormatted[, int $offset = 0 ]) : mixed
Parameters
-
$timeFormatted
: string
-
-
$offset
: int
= 0
-
__toString()
public
__toString() : string
public
static getFormat() : string|null
Return values
string|null
getOffset()
public
getOffset() : int
public
static getRenderFormat() : string
getTimestamp()
public
getTimestamp() : int
isCorrect()
public
static isCorrect(string $timeFormatted) : bool
Parameters
-
$timeFormatted
: string
-
jsonSerialize()
public
jsonSerialize() : mixed
serialize()
public
serialize() : string
toServerTime()
public
toServerTime() : DateTime
toSystemObject()
public
toSystemObject() : DateTime
toUserTime()
public
toUserTime(int $userOffset) : DateTime
Parameters
-
$userOffset
: int
-
public
static tryMakeCorrectFormat(string $timeFormatted[, int $offset = 0 ]) : string
Parameters
-
$timeFormatted
: string
-
-
$offset
: int
= 0
-