在php中格式化一个DateTime,格式为“JJJJ-MM-TTTss:mmZZZ”[关闭]

I'm trying to format a date like Google specifies to format it

the format specified by Google is :

" JJJJ-MM-TTTss:mmZZZ "

What I tried so far is:

  var_dump(date_format($date,'Y-M-D H:m:s'));

results in

  "2013-Aug-Wed 18:08:37"

when I try to uses googles format like

 var_dump(date_format($date,'JJJJ-MM-TTTss:mmZZZ'));

it results in

 JJJJ-AugAug-CESTCESTCEST3737:0808720072007200"

I have no idea what it should look like, any help?

thanks in advance

As i understand you are reading non english version of google manual, in english this date format looks like

YYYY-MM-DDThh:mmTZD

and example of this is

1997-07-16T19:20+01:00

You can try to produce this in PHP like this

echo date("Y-m-d\TH:s", time());

What about this?

$date = date_create();
print date_format($date, 'Y-m-d\TH:iT');

Output:

2014-03-24T10:43CET