I echo this :
php> echo date("Y-m-dTH:i:s");
2011-05-27T11:21:23
How can do with date function to get this date format:
2011-01-12T14:41:35.7042252+01:00
(for example)
35.7042252 => seconds.decimal-fraction-of-second
I have tried:
php> function getTimestamp()
... {
... return date("Y-m-dTH:i:s") . substr((string)microtime(), 1, 8);
... }
php> echo getTimestamp();
2011-05-27T15:34:35.6688370 // missing +01:00 how can I do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…