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 settingsSYNOPSISstring gmstrftime (string $format, [int $timestamp = time()])DESCRIPTIONBehaves 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".PARAMETERSo $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 VALUESReturns 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).EXAMPLESExample #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 ALSOstrftime(3). PHP Documentation Group GMSTRFTIME(3)
Related Man Pages |
---|
strftime(3) - php |
mktime(3) - php |
strtotime(3) - php |
gmdate(3) - php |
strptime(3) - php |