fork download
  1. <?php
  2.  
  3. $date= date("c");
  4. echo "Current: $date\n"; // => 2016-01-07T12:46:16+00:00
  5. $new_date = substr($date, 0, strrpos($date, ":")) . "Z";
  6. echo "New : " . $new_date; // 2016-01-07T20:35:06+00Z
  7.  
  8.  
Success #stdin #stdout 0.03s 52472KB
stdin
Standard input is empty
stdout
Current: 2016-01-07T22:10:54+00:00
New    : 2016-01-07T22:10:54+00Z