Unix and Linux Discussions Tagged with linuxworld |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
720 |
UNIX and Linux RSS News |
|
|
|
0 |
1,159 |
UNIX and Linux RSS News |
|
|
|
0 |
1,377 |
UNIX and Linux RSS News |
|
|
|
0 |
970 |
UNIX and Linux RSS News |
|
|
|
0 |
837 |
UNIX and Linux RSS News |
|
|
|
0 |
1,368 |
UNIX and Linux RSS News |
|
|
|
0 |
1,003 |
UNIX and Linux RSS News |
|
|
|
0 |
1,020 |
UNIX and Linux RSS News |
|
|
|
0 |
856 |
UNIX and Linux RSS News |
|
|
|
0 |
956 |
UNIX and Linux RSS News |
|
|
|
0 |
1,164 |
UNIX and Linux RSS News |
|
|
|
0 |
833 |
UNIX and Linux RSS News |
|
|
|
0 |
942 |
UNIX and Linux RSS News |
|
|
|
0 |
1,042 |
UNIX and Linux RSS News |
|
|
|
0 |
832 |
UNIX and Linux RSS News |
|
|
|
0 |
903 |
UNIX and Linux RSS News |
|
|
|
0 |
1,477 |
UNIX and Linux RSS News |
|
|
|
0 |
766 |
UNIX and Linux RSS News |
|
|
|
0 |
914 |
UNIX and Linux RSS News |
|
|
|
0 |
736 |
UNIX and Linux RSS News |
|
|
|
0 |
1,095 |
UNIX and Linux RSS News |
|
|
|
0 |
1,054 |
UNIX and Linux RSS News |
|
|
|
0 |
881 |
UNIX and Linux RSS News |
|
|
|
0 |
1,071 |
UNIX and Linux RSS News |
|
|
|
0 |
939 |
UNIX and Linux RSS News |
|
|
|
0 |
1,221 |
UNIX and Linux RSS News |
|
|
|
0 |
999 |
UNIX and Linux RSS News |
|
|
|
0 |
761 |
UNIX and Linux RSS News |
|
|
|
0 |
1,355 |
UNIX and Linux RSS News |
|
|
|
0 |
1,485 |
UNIX and Linux RSS News |
|
|
|
0 |
1,260 |
UNIX and Linux RSS News |
|
|
|
0 |
1,862 |
UNIX and Linux RSS News |
|
|
|
6 |
4,452 |
News, Links, Events and Announcements |
|
|
|
7 |
17,924 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
2,286 |
UNIX Desktop Questions & Answers |
|
|
|
0 |
2,517 |
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)