System time in PHP

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


15 points

HOw can i code the latest system time in PHP?

-jcp



-2 points


<?php
$time_offset 
="525"// Change this to your time zone
$time_a = ($time_offset 120);
$time date("h:i:s",time() + $time_a);
echo 
'Current time is : '.$time;
?>

Anonymous's picture
Created by Anonymous

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.