Q:

How can I get StackOverflow style timestamps with the DateTime class?

How can I get a date that looks like this:
2010-07-08 23:59:59Z
from .NET's DateTime class?

A:

You're looking for the universal sortable format string, like this:
string str = DateTime.Now.ToString("u");

A:

See:

Standard Date and Time Format Strings
Custom Date and Time Format Strings

