thieumao

doi thoi gian PHP

Apr 25th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2. $giodienra= "01:45:00";
  3. $ngaydienra= "30/04/2014";
  4. $timestamp1 = strtotime($giodienra);
  5. $timestamp2 = strtotime($ngaydienra);
  6. $timestamp = $timestamp1 + $timestamp2+7*3600;
  7. echo "<br>timestamp: $timestamp";
  8. //echo gmdate("M d Y H:i:s", 1396103400);
  9. //$str = 'Mar 29 2014 14:30:00';
  10. $start_time= "1398822300";
  11. echo "<br><hr><br>";
  12. echo "Test: ";
  13. echo gmdate("m d Y H:i:s", $start_time);
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment