fork download
  1. <?php
  2.  
  3. $selectedTime = '2013-09-29 01:50:00';
  4. $datetime = DateTime::createFromFormat('Y-m-d g:i:s', $selectedTime, new DateTimeZone('Pacific/Auckland'));
  5. $dt = $datetime->modify('+15 minutes');
  6. echo $datetime->format('g:i:s');
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
3:05:00