1

Is there a name for the timestamp format below? How would I go about using PHP to reproduce the time and date now in the same format?

2012-11-15T17:30:47-05:00

Thanks

jskidd3
  • 4,609
  • 15
  • 63
  • 127

2 Answers2

3

It seems to be ISO 8601 format, http://en.wikipedia.org/wiki/ISO_8601. Look at this to display a date in that format: How to display a date as iso 8601 format with PHP

Community
  • 1
  • 1
Pieter
  • 1,823
  • 1
  • 12
  • 16
2

ISO 8601 format was added to the date() function in PHP 5 so you can use:

date('c');

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

Pitchinnate
  • 7,517
  • 1
  • 20
  • 37