Finding time parts : localtime « Date « PHP






Finding time parts

 
<?php
$now_1 = getdate();
$now_2 = localtime();
print "{$now_1['hours']}:{$now_1['minutes']}:{$now_1['seconds']}\n";
print "$now_2[2]:$now_2[1]:$now_2[0]";
?>
  
  








Related examples in the same category

1.Changing time zone with an environment variable
2.Using localtime()
3.Simple time zone calculation
4.Return array from localtime( )