<?php
/* - - - - - - - - - - - - - - - - -
Object oriented style
- - - - - - - - - - - - - - - - - */
DateTime public DateTime::setTime ( int $hour ,
int $minute ,
int $second = 0 ,
int $microsecond = 0 )
where,
$hour = The hour of the time
$minute = The minute of the time
$second = The second of the time
$microseconds = The microsecond of the time
?>
<?php
/* - - - - - - - - - - - - - - - - -
Procedural style
- - - - - - - - - - - - - - - - - */
DateTime date_time_set ( DateTime $object ,
int $hour ,
int $minute ,
int $second = 0 ,
int $microsecond = 0 )
where,
$object = A DateTime object returned by date_create
$hour = The hour of the time
$minute = The minute of the time
$second = The second of the time
$microseconds = The microsecond of the time
?>
<?php
date_default_timezone_set('Europe/Madrid');
$dttm001 = new DateTime('now');
$nwtm001 = $dttm001->setTime(8, 18, 32, 480000000);
echo $dttm001->format(DATE_COOKIE);
?>
<?php
date_default_timezone_set('Europe/Madrid');
$dttm002 = date_create("now");
$nwtm002 = date_time_set($dttm002, 8, 18, 32, 480000000);
echo $dttm002->format('l, d-M-Y H:i:s T');
?>