Unix and Linux Discussions Tagged with linuxworld |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
708 |
UNIX and Linux RSS News |
|
|
|
0 |
1,147 |
UNIX and Linux RSS News |
|
|
|
0 |
1,368 |
UNIX and Linux RSS News |
|
|
|
0 |
962 |
UNIX and Linux RSS News |
|
|
|
0 |
814 |
UNIX and Linux RSS News |
|
|
|
0 |
1,351 |
UNIX and Linux RSS News |
|
|
|
0 |
995 |
UNIX and Linux RSS News |
|
|
|
0 |
1,012 |
UNIX and Linux RSS News |
|
|
|
0 |
851 |
UNIX and Linux RSS News |
|
|
|
0 |
946 |
UNIX and Linux RSS News |
|
|
|
0 |
1,159 |
UNIX and Linux RSS News |
|
|
|
0 |
826 |
UNIX and Linux RSS News |
|
|
|
0 |
936 |
UNIX and Linux RSS News |
|
|
|
0 |
1,037 |
UNIX and Linux RSS News |
|
|
|
0 |
824 |
UNIX and Linux RSS News |
|
|
|
0 |
896 |
UNIX and Linux RSS News |
|
|
|
0 |
1,471 |
UNIX and Linux RSS News |
|
|
|
0 |
760 |
UNIX and Linux RSS News |
|
|
|
0 |
902 |
UNIX and Linux RSS News |
|
|
|
0 |
726 |
UNIX and Linux RSS News |
|
|
|
0 |
1,089 |
UNIX and Linux RSS News |
|
|
|
0 |
1,045 |
UNIX and Linux RSS News |
|
|
|
0 |
874 |
UNIX and Linux RSS News |
|
|
|
0 |
1,061 |
UNIX and Linux RSS News |
|
|
|
0 |
936 |
UNIX and Linux RSS News |
|
|
|
0 |
1,214 |
UNIX and Linux RSS News |
|
|
|
0 |
995 |
UNIX and Linux RSS News |
|
|
|
0 |
757 |
UNIX and Linux RSS News |
|
|
|
0 |
1,349 |
UNIX and Linux RSS News |
|
|
|
0 |
1,477 |
UNIX and Linux RSS News |
|
|
|
0 |
1,247 |
UNIX and Linux RSS News |
|
|
|
0 |
1,854 |
UNIX and Linux RSS News |
|
|
|
6 |
4,375 |
News, Links, Events and Announcements |
|
|
|
7 |
17,647 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
2,269 |
UNIX Desktop Questions & Answers |
|
|
|
0 |
2,454 |
News, Links, Events and Announcements |
GMDATE(3) 1 GMDATE(3)
gmdate - Format a GMT/UTC date/time
SYNOPSIS
string gmdate (string $format, [int $timestamp = time()])
DESCRIPTION
Identical to the date(3) function except that the time returned is Greenwich Mean Time (GMT).
PARAMETERS
o $format
- The format of the outputted date string. See the formatting options for the date(3) function.
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 formatted date string. If a non-numeric value is used for $timestamp, FALSE is returned and an E_WARNING level error is emitted.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | The valid range of a timestamp is typically from |
| | Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 |
| | 03:14:07 GMT. (These are the dates that corre- |
| | spond to the minimum and maximum values for a |
| | 32-bit signed integer). However, before PHP 5.1.0 |
| | this range was limited from 01-01-1970 to |
| | 19-01-2038 on some systems (e.g. Windows). |
| | |
| 5.1.1 | |
| | |
| | There are useful constants of standard date/time |
| | formats that can be used to specify the $format |
| | parameter. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
gmdate(3) example
When run in Finland (GMT +0200), the first line below prints "Jan 01 1998 00:00:00", while the second prints "Dec 31 1997
22:00:00".
<?php
echo date("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
echo gmdate("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
?>
SEE ALSO
date(3), mktime(3), gmmktime(3), strftime(3).
PHP Documentation Group GMDATE(3)