The second method worked, as far as this is what I got:
2008-03-19T06:08:59+00:00
But to be hones its for a google news sitemap, and there's is something like:
2008-03-19T06:08:59Z
I could easily do
$tz_offset = substr_replace(date('O'), ':', -2, 0);
$w3c_date = date('Y-m-d\TH:i:s').$tz_offset;
$date = strreplace("+","Z",$w3c_date);
But I don't know if the Z is a constant or a changing element depending on the time, again, no amount of reading has led me to this information. Also, will the above formats go into my Database in a datetime field, or will I need to make it varchar?