PHP gmstrftime() Function

PHP gmmktime() function
PHP idate() function

What is the syntax of the gmstrftime() function in PHP?

gmstrftime(format, timestamp)
ParameterDescription
formatRequired. Specifies how to return the result:

Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time())

Examples of the gmstrftime() function

Example 1. In this example,

Format GMT/UTC date and time according to locale settings:

<?php
echo(gmstrftime("%B %d %Y, %X %Z",mktime(20,0,0,12,31,98))."<br>");
setlocale(LC_ALL,"hu_HU.UTF8");
echo(gmstrftime("%Y. %B %d. %A. %X %Z"));
?>
PHP gmmktime() function
PHP idate() function
en English
X
Scroll to Top