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

search for in the

date_timestamp_get> <date_sunset
[edit] Last updated: Fri, 18 May 2012

view this page in

date_time_set

(PHP 5 >= 5.2.0)

date_time_setAlias of DateTime::setTime()

Description

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



add a note add a note User Contributed Notes date_time_set
Sarah 14-Mar-2012 12:22
<?php
   $dateSrc
= '2007-04-19 12:50 GMT';
  
$dateTime = date_create( $dateSrc);;
  
$retval = date_time_set( $dateTime, 20, 40, 10);
   echo
'DateTime::format(): '.$dateTime->format('Y:M:D:H:i:s');
   echo
"\n";

  
# Using second function.
  
$dateTime = new DateTime($dateSrc);
  
$retval = $dateTime->setTime(20, 56,6);
   echo
'DateTime::format(): '.$dateTime->format('Y:M:D:H:i:s');
?>

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