Boost logo

Boost Users :

From: Lothar Werzinger (lothar_at_[hidden])
Date: 2008-07-31 23:15:13


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)

as you can see only the ouputIso works without problems.

$ /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=2005
actual =2005
expected=Sep
actual =Sep
expected=30
actual =30
expected=19
actual =19
expected=25
actual =25
expected=17
actual =17
expected=1
actual =0
boost1: boost1.cpp:100: void testInputIso(): Assertion `(true) == (0 !=
ldt.zone().get())' failed.
Aborted
testing testInputIsoWide ...
expected=2005
terminate called after throwing an instance of 'boost::gregorian::bad_year'
  what(): Year is out of valid range: 1400..10000
Aborted
testing testOutputIso ...
expected=2005-09-30 19:25:17+01:00
actual =2005-09-30 19:25:17+01:00
expected=2005-09-30 19:25:17-08:00
actual =2005-09-30 19:25:17-08:00
testing testOutputIso OK
testing testOutputIsoWide ...
expected=2005-09-30 19:25:17+01:00
actual =2005-Sep-30 19:25:17 CET
boost1: boost1.cpp:267: void testOutputIsoWide(): Assertion
`(iso8859_1<std::string>(str)) == (iso8859_1<std::string>(ss.str()))' failed.
Aborted

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