Boost logo

Boost Users :

From: Bart (bartmann.nsd_at_[hidden])
Date: 2005-07-25 16:12:58


On Mon, 25 Jul 2005 19:32:48 +0400, Serge Skorokhodov wrote:

> Hi,
>
> The following code looks pretty suspicious to me:
>
> extern const wchar_t* pts; // pts = L"2004071"

Is this a typo or did you intentionally leave your date string one
character too short?

> std::wistringstream wiss(pts);
> wtime_input_facet* wtif = new wtime_input_facet;
> wtif->set_iso_format();
> wiss.imbue(std::locale(std::locale::classic(), wtif));
> ptime pt;
> wiss >> pt;
> std::string dbgs = to_iso_string(pt);
> // dbgs == "20040711T000000"
>

Again, is this a typo? I got a different result when I ran this example.

> Seems to be a bug?

Bart


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net