Web Analytics

PHP gmstrftime() Function

Date/Time FunctionPHP 4+

The gmstrftime() function formats a GMT/UTC time/date according to locale settings. It behaves the same as strftime() except it uses GMT time.

Warning: This function has been DEPRECATED as of PHP 8.1.0. Relying on this function is highly discouraged. Use gmdate() or IntlDateFormatter::format() instead.

Syntax

gmstrftime(string $format, ?int $timestamp = null): string|false

Try It Online

Output
Click Run to execute your code

Related Functions

  • strftime() - Format a local time/date according to locale settings
  • gmdate() - Format a GMT/UTC date/time