Advertisement
fauzanedris

Expired Time

Feb 8th, 2024
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. $time_now         = time(); // timestamp
  3. $expired_duration = 60 * 60; // 1 hour (minutes * seconds)
  4. $time_expired     = $time_now + $expired_duration;
  5. echo( $time_now . '<br>' );
  6. echo( $time_expired . '<br>' );
  7. echo( date( 'F j, Y, g:i a', $time_now ) . '<br>' );
  8. echo( date( 'F j, Y, g:i a', $time_expired ) );
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement