gmstrftime

string gmstrftime(string format, [int timestamp]) 
format String to format time and date
timestamp UNIX timestamp giving the date information to be formatted

Formats a GMT/UTC time or date according to locale settings.

Returns:

Formatted date string; FALSE on error

Description:

This function is like strftime() except the returned time is formatted to GMT.

Version:

PHP 3 since 3.0.12, PHP 4

See also:

strftime() 
gmdate() 
date() 

Example:

Format a date to GMT
/* Print the current date, time, and time zone. */ 
echo gmstrftime("It is now %A %B %e, 2001, at %X (time zone: %Z).\n", time()); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.