Menu Samaritan's Purse

GMDATE

Format a GMT/UTC date/time

SYNTAX

gmdate ( string $format [, int $timestamp = time() ] ) : string

PARAMETERS

format

The format of the outputted date string. See the formatting options for the date() function.

timestamp

The optional timestamp parameter is an integer Unix timestamp that defaults to the current local time if a timestamp is not given. In other words, it defaults to the value of time().

RETURN

Returns a formatted date string. If a non-numeric value is used for timestamp, FALSE is returned and an E_WARNING level error is emitted.

EXAMPLES

FORMAT

2020-10-24 11:15:55

TIMESTAMP

2001-02-03 12:05:06

PHP