To format the current timestamp in W3C Datetime encoding (as used in sitemap.xml files) use the following parameters.
echo date('Y-m-dTH:i:sP', time());
As of PHP5 you can also use the c format character to print the exact same string.
These would both print out the following:
hi, new to the site, thanks.
Thanks.. you solved my problem
so simple. I finally find clear one here .. nice contribution
Brilliant! Simple! Works! Thanks so much
thannks for share :) awesome post..