In Javascript to get the current time for the time stamp I'm using
JSON.stringify(new Date());
Which is giving me following output.
"2016-06-07T10:38:54.767Z"
In PHP how can I get this kind of output in datetime function.
I know this problem can be handled by date function of php. But what I'm looking for is exact argument to that date function so that I can get the output same as given in the question. Which is in UTC timezone. There are similar questions explaining date function but I'm not able to figure out exact arguments for my desired output.
In PHP I tried this
date_default_timezone_set('UTC');
echo date('c');
Which is giving me
2016-06-07T11:56:54+00:00
Thanks in advance.