Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP getdate() Function

PHP getdate() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return date/time information for the current local date/time:

Run Example »


Definition and Usage

The getdate() function returns date/time information for a given timestamp or the current local date/time.

Syntax

getdate(

timestamp);

Parameters Description
timestamp Optional. Specifies an integer Unix timestamp. Defaults to the current local time (time()).

Technical Details

| Return Value: | Returns an associative array containing information related to the timestamp:

| | --- | --- | | PHP Version: | 4+ |

PHP Date/Time PHP Date/Time Reference Manual