Given:
DateTime.UtcNow
How do I get a string which represents the same value in an ISO 8601-compliant format?
Note that ISO 8601 de
DateTime.UtcNow.ToString("s")
Returns something like 2008-04-10T06:30:00
UtcNow obviously returns a UTC time so there is no harm in:
UtcNow
string.Concat(DateTime.UtcNow.ToString("s"), "Z")