I think I only half read the original question: the keeping the trailing zeroes of an outputted double. But not the time part.
There is time_t, but that's just a integral type (usually unsigned long long these days) which holds a count of seconds since 1 Jan 1970, and will display just like a regular integer. And there's struct tm, which you'd have to display member by member. Plus various system specific types.
But there's no standard date or time class in C++.
Boost does have the boost::date class, which might be of interest?
Failing that, you could code your own time or date class.
You do need a time class if you want to code an insertion operator which know how to format time properly!
If I was coding one for prototyping purposes, I'd probably base the class on time_t so I can use the standard time routines to do the work for me. e.g. strftime()
http://www.cplusplus.com/reference/clibrary/ctime/strftime/
Andy