Boost logo

Boost Users :

From: Lothar Werzinger (lothar_at_[hidden])
Date: 2008-08-01 11:20:18


On Thursday 31 July 2008, Lothar Werzinger wrote:
> On Thursday 31 July 2008, Steven Watanabe wrote:
> > AMDG
> >
> > Lothar Werzinger wrote:
> > > There is a bug in the datetime library iostream operators
> >
> > So, why exactly is it a bug for "2005-09-30 19:25:17+01:00"
> > to yield 19 in the hours? What am I missing?
>
> Oops that's a leftover from an earlier try. I wanted to find out if the
> local or utc time get's returned. Of course the checks should be the same
> as in InputIsoWide (fixed file is attached)

Actually the "fix" is wrong. I let me trick by your question about the 19 in
the hour field. Of course it must be 18 (as it is the UTC time hour field).
The problem stems from the fact that the library fails to parse the offset
and does not create a timezone object. Find the correct test attached.

As stated before I want to read back a time created by the library (and
verified OK by the testOutput* functions). If I am doing something wrong
trying to read it back, please let me know. If this is a "real" bug, please
help to find a fix for the upcoming 1.36 release.

$ /opt2/linux/ix86/bin/g++-4.3.1 -I/opt2/linux/x86_64/include/boost-1_36 -o
boost1 boost1.cpp && (./boost1; ./boost1 1; ./boost1 1 2; ./boost1 1 2 3)
testing testInputIso ...
expected=18
actual =19
boost1: boost1.cpp:103: void testInputIso(): Assertion
`(static_cast<int32_t>(18)) == (ldt.utc_time().time_of_day().hours())'
failed.
testing testInputIsoWide ...
expected=18
actual =19
boost1: boost1.cpp:159: void testInputIsoWide(): Assertion
`(static_cast<int32_t>(18)) == (ldt.utc_time().time_of_day().hours())'
failed.
testing testOutputIso ...
testing testOutputIso OK
testing testOutputIsoWide ...
testing testOutputIsoWide OK

Lothar

-- 
Lothar Werzinger Dipl.-Ing. Univ.
framework & platform architect
Tradescape Inc. - Enabling Efficient Digital Marketplaces
1754 Technology Drive, Suite 128
San Jose, CA 95110
web: http://www.tradescape.biz



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