php man page for gmstrftime

Query: gmstrftime

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

GMSTRFTIME(3)								 1							     GMSTRFTIME(3)

gmstrftime - Format a GMT/UTC time/date according to locale settings

SYNOPSIS
string gmstrftime (string $format, [int $timestamp = time()])
DESCRIPTION
Behaves the same as strftime(3) except that the time returned is Greenwich Mean Time (GMT). For example, when run in Eastern Standard Time (GMT -0500), the first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 01:00:00".
PARAMETERS
o $format - See description in strftime(3). o $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(3).
RETURN VALUES
Returns a string formatted according to the given format string using the given $timestamp or the current local time if no timestamp is given. Month and weekday names and other language dependent strings respect the current locale set with setlocale(3).
EXAMPLES
Example #1 gmstrftime(3) example <?php setlocale(LC_TIME, 'en_US'); echo strftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . " "; echo gmstrftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . " "; ?>
SEE ALSO
strftime(3). PHP Documentation Group GMSTRFTIME(3)
Related Man Pages
date(3) - php
gmmktime(3) - php
date_sunset(3) - php
date_sunrise(3) - php
localtime(3) - php
Similar Topics in the Unix Linux Community
Retrieving accurate file timestamp
getting the current time in Epoch format
How to extract timestamp from the filename?
GMT to local Time conversion
Convert Timestamp in text to Serial Date-Time