Boost logo

Boost Users :

Subject: [Boost-users] some simple questions on Date/Time parsing and formatting
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2012-03-19 17:10:29

The Boost function ptime from_iso_string seems to only take part of a ISO 8601 date
string. In particular, strings coming from XML will have a trailing Z. Even knowing that
we will always get 'Z' and not some arbitrary timezone information, it seems a kludge to
truncate the last character from the string before feeding it to a function that claims to
parse an ISO date/time string. Am I missing something?

Second, is there a simple function to format a ptime using the conventions of the current
Locale? I see functions for "simple" and "iso", but user-facing output (as opposed to
creating an XML file) needs to use local conventions.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at