Skip to content

Instantly share code, notes, and snippets.

@juniorb2ss
Created October 24, 2014 23:49
Show Gist options
  • Select an option

  • Save juniorb2ss/41f06344dcd7cbb5778a to your computer and use it in GitHub Desktop.

Select an option

Save juniorb2ss/41f06344dcd7cbb5778a to your computer and use it in GitHub Desktop.
<?php
$current_date = new DateTime( '2014-10-24 21:37:00' ); // 2011-12-04 20:13:35
$current_date->add( new DateInterval( 'PT22H' ) );
echo $current_date->format( 'Y-m-d H:i:s' ); // 2011-12-07 20:13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment