Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-06-07 22:48:39


LABELLE, Maxime wrote:
> I'm experiencing a problem using custom formatting of fractional seconds.
>
> const std::string date_string = "2006 Jun 01 999000 23.59.59";
> const std::string format_string = "%Y %b %d %f %H.%M.%S";
>
> When using a time_facet together with the "%f" flag, I get a correct output
> containing a 6-digit number in place of the fractional part.
>
> However, using a time_input_facet together with the "%f" flag, I cannot get
> a correct ptime from an input using the same format as the above example.
>
>...snip detail...
>
> Am I missing something ?

No, I'm afraid this is a parser bug. I've put together a fix I'd like
you to try out. I don't believe it's 100% generalized yet, but I
believe it fixes your issue and doesn't break any of the current
regression tests. Download it from

http://boost-consulting.com/vault/index.php

under date_time -- time_facet.hpp and patch it into your
boost/date_time/ directory.

Thanks,

Jeff


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