Documentation

Time
in package

Time class.

Table of Contents

formatToDB()  : mixed
Returns time in database format.
formatToDisplay()  : string
Returns time in user format.
sanitizeDbFormat()  : string
Function changes the time format to the database format without changing the time zone.

Methods

formatToDB()

Returns time in database format.

public static formatToDB(string|null $time[, bool $convertTimeZone = true ]) : mixed
Parameters
$time : string|null
$convertTimeZone : bool = true
Return values
mixed

formatToDisplay()

Returns time in user format.

public static formatToDisplay(string $time[, bool $convertTimeZone = true ]) : string
Parameters
$time : string
$convertTimeZone : bool = true
Return values
string

sanitizeDbFormat()

Function changes the time format to the database format without changing the time zone.

public static sanitizeDbFormat(string $time) : string
Parameters
$time : string
Return values
string

        

Search results