Skip to content

Instantly share code, notes, and snippets.

@rajucs
Created October 7, 2019 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajucs/1c0e7fa13e1fb5b96690ecb0917a193d to your computer and use it in GitHub Desktop.
Save rajucs/1c0e7fa13e1fb5b96690ecb0917a193d to your computer and use it in GitHub Desktop.
$difference = strtotime($list_vids['ExpirationDate']) - strtotime($now);
$hours = $difference / 3600; // 3600 seconds in an hour
$minutes = ($hours - floor($hours)) * 60;
$final_hours = round($hours,0);
$final_minutes = round($minutes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment