I’m working with the Azure REST API and they are using this to create the request body for table storage:
DateTime.UtcNow.ToString("o")
Which produces:
2012-03-02T04:07:34.0218628Z
It is called “round-trip” and apparently it’s an ISO standard (see http://en.wikipedia.org/wiki/ISO_8601) but I have no idea how to replicate it after reading the wiki article.
Does anyone know if Boost has support for this, or possibly Qt?
If the time to the nearest second is precise enough, you can use
strftime:If you need more precision, you can use Boost: