Boost logo

Boost Users :

Subject: Re: [Boost-users] some simple questions on Date/Time parsing and formatting
From: Václav Zeman (vhaisman_at_[hidden])
Date: 2012-03-20 13:11:51

On 03/19/2012 10:10 PM, John M. Dlugosz wrote:
> 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.

It shows how to imbue streams with modified locales that can output the
date_time values.


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