dismiss Step into the future! Click here to switch to the beta php.net site
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

date_timezone_get> <date_timestamp_get
[edit] Last updated: Fri, 28 Jun 2013

view this page in

date_timestamp_set

(PHP 5 >= 5.3.0)

date_timestamp_setAlias of DateTime::setTimestamp()

Description

This function is an alias of: DateTime::setTimestamp()



add a note add a note User Contributed Notes date_timestamp_set - [1 notes]
up
0
prt dot ed48 dot com
1 day ago
Example 01:

<?php

date_default_timezone_set
("UTC");

$dftz011 = date_default_timezone_get();

echo
'<br><b>' . $dftz011 . '</b><br><br>';

$dtms011 = new DateTime();

$dtms011->setTimestamp(1234567890);

echo
$dtms011->format('B => (U) => T Y-M-d H:i:s');

?>

Example 02:

<?php

date_default_timezone_set
("America/New_York");

$dftz021 = date_default_timezone_get();

echo
'<br><b>' . $dftz021 . '</b><br><br>';

$dtms021 = date_create();

date_timestamp_set($dtms021, 1234567890);

echo
date_format($dtms021, 'B => (U) => T Y-M-d H:i:s');

?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites