this code always returns 0 in PHP 5.2.5 for microseconds:
format(\"Y-m-d\\TH:i:s.u\") . \"\\n\"; ?>
This method is safer than the accepted answer:
date('Y-m-d H:i:s.') . str_pad(substr((float)microtime(), 2), 6, '0', STR_PAD_LEFT)
Output:
2012-06-01 12:00:13.036613
Update: Not recommended (see comments)