-2

I want to get UTC time as in below format.

2017-09-12T10:14:00.000Z

Thanks in advance

2 Answers2

0

Please check the official documentation on this subject : Link here

Boian Ivanov
  • 164
  • 1
  • 3
  • 14
0

Please people, just TRY looking at the docs.

http://php.net/manual/en/function.date.php

c | ISO 8601 date (added in PHP 5) | 2004-02-12T15:19:21+00:00

$formattedDate = date("c");
Martin B.
  • 1,567
  • 14
  • 26