date format with t and z php

PHP
str_replace('+00:00', '.000Z', gmdate('c', strtotime('2013-05-07 18:56:57')))

Source

Also in PHP: