|
Boost : |
From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-08-01 19:10:17
On Mon, 31 Jul 2006 16:49:01 -0700, "Joe Van Dyk"
<joevandyk_at_[hidden]> wrote:
>Hi,
>
>(sorry if this is off topic)
Basically it is, but everything can be made on-topic if adequately
worded :-)
>I need to get the current date and time and convert it into a string
>that follows the xsd:datetime time stamp format:
>[-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm].
>
>(timezone should be UTC)
>
>Any ideas on how to do that? The Boost::Date_Time library
>documentation is confusing to my feeble mind.
If that's your only usage then date_time is probably overkill and I'd
suggest just resorting to the standard strftime. Something like this
might fit your needs:
<http://boost.cvs.sourceforge.net/boost/boost/tools/common/time_string.hpp?revision=1.1&view=markup>
-- [ Gennaro Prota, C++ developer for hire ]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk