Modify

Opened 9 years ago

Last modified 9 years ago

#2904 new Bugs

boost::date_time io fails simple back-and-forth test

Reported by: mgl@… Owned by: az_sw_dude
Milestone: Boost 1.39.0 Component: date_time
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

set up a stringstream and use boost::io facets to specify a time format. Sent a time_t from a known time through it to get a string (converting to posix_time along the way), then back through to to get a time, and back through to get a string. The string results should always match, and the time_t results always match. Both tests fail.

stringstream>> operator does not seem to modify the supplied instance of class boost::posix_time.

Attachments (1)

time_test.h (4.7 KB) - added by mgl@… 9 years ago.
date_time test to demo problem with boost::date_time ticket 2904

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by mgl@…

Attachment: time_test.h added

date_time test to demo problem with boost::date_time ticket 2904

comment:1 Changed 9 years ago by anonymous

built with gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) on FC 10 platform.

comment:2 Changed 9 years ago by anonymous

Severity: ShowstopperProblem

Downgraded priority after I realized that a work-around was to have two streams, since one problem appears to be that loading the output facet erases the input facet. This behaviour still seems pretty strange. I would think that a detailed investigation is merited. At least the documentation should reflect it, shouldn't it?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain az_sw_dude.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.