<div class="gmail_quote">On Sun, Jan 13, 2008 at 11:11 AM, Soren Dreijer <span dir="ltr"><<a href="mailto:admin@blacksmith-studios.dk">admin@blacksmith-studios.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> I'm creating a posix_time::time_duration object based on the minutes()<br> helper function. If I specify a large value, such as 2000, I get a<br> time_duration of 33:20:00. Take a look at the following piece of code,<br> though:<br> <br> time_duration td = minutes(2000);<br> cout << to_simple_string(td); // OK<br> cout << td; // Fails with an assertion in VS2008<br> <br> The latter call fails with the following assertion in strftime.c on line<br> 658:<br> _VALIDATE_RETURN( ( ( timeptr->tm_hour >=0 ) && ( timeptr->tm_hour <=<br> 23 ) ), EINVAL, FALSE)<br> <br> Apparently, operator<< expands to _expandtime(), which doesn't allow values<br> for the hour to be greater than 23. Is this intended behavior, or should I<br> just always use to_simple_string() rather than the convenient operator<< ?<br> <br></blockquote></div><br><div>I'm seeing a similar problem, but did not see any replies to this. Does anyone know the answer? I'm using boost 1.34.1; has this been fixed in a newer version? There is no to_simple_string() method for this class, at least not in this version of boost.<br> <br></div>