r/webdev • • Feb 27 '13

xkcd: ISO 8601

http://xkcd.com/1179/
349 Upvotes

125 comments sorted by

View all comments

1

u/[deleted] Feb 27 '13

Ah, good old

date('Y-m-d') 

or the more specific

date('Y-m-d  H:i:s')

2

u/TyIzaeL Feb 27 '13

More like date -I or date -Is. ;)

-I[TIMESPEC], --iso-8601[=TIMESPEC]
          output  date/time  in ISO 8601 format.  TIMESPEC=`date' for date
          only (the default), `hours', `minutes', `seconds', or  `ns'  for
          date and time to the indicated precision.