downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DateTime::getTimezone> <DateTime::getOffset
Last updated: Fri, 20 Nov 2009

view this page in

DateTime::getTimestamp

(PHP 5 >= 5.3.0)

DateTime::getTimestampGets the Unix timestamp

Description

public int DateTime::getTimestamp ( void )

Gets the Unix timestamp.

Parameters

This function has no parameters.

Return Values

Returns Unix timestamp representing the date.

See Also



add a note add a note User Contributed Notes
DateTime::getTimestamp
aharvey at php dot net
30-Oct-2009 03:05
The functionality of getTimestamp() can be emulated in PHP 5.2 with the format() method:

<?php
// Given a DateTime object $dateTime:
$timestamp = $dateTime->format('U');
?>

DateTime::getTimezone> <DateTime::getOffset
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites