0

I have to covert my current time stamp in above mentioned format. How do I do it using PHP and what 'T' means in above statement?

  • 4
    Possible duplicate of [How to convert date to timestamp in PHP?](http://stackoverflow.com/questions/113829/how-to-convert-date-to-timestamp-in-php) – Sandeep May 03 '16 at 05:35

2 Answers2

1

PHP has date function with c ISO 8601 date (added in PHP 5)

Simple:

<?php
echo date("c");
Thamilhan
  • 13,040
  • 5
  • 37
  • 59
0

You have not given us your current timestamp, but you can echo the mentioned timestamp like this:

echo Date("Y-m-d"). "T" .date("h:i:s-O");

I believe T means time. But don't know

Andreas
  • 23,610
  • 6
  • 30
  • 62