Posted By

dubogii on 08/22/11


Tagged

time local current


Versions (?)

Get the Current Time


 / Published in: PHP
 

  1. <?php
  2. $h = "8"; // Standard time zone for Hong Kong :UTC/GMT +8 hours
  3. $hm = $h * 60;
  4. $ms = $hm * 60;
  5. $localtime= gmdate("m/d/Y g:i:s A", time()+($ms));
  6. echo "Your current time now is : $localtime. ";
  7. ?>

Report this snippet  

You need to login to post a comment.