
19 Mar
2012
19 Mar
'12
9:10 p.m.
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. Thanks, —John