Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::posix_time::time_period - how to round seconds?
From: Igor R (boost.lists_at_[hidden])
Date: 2011-12-03 12:52:25


> I am building intervals using 0.5h increments (1800sec) in a cycle. The
> interval length is 1800sec also
>
> 8:30 am is used as start date.
>
> last of my interval looks like this:
>
> [2009-Apr-07 14:30:00/2009-Apr-07 14:59:59.999999]
>
> because of this weired endpoint my data with the timestamp of
> Apr-07 15:00:0000 does not fit into the interval
>
> How can I fix the interval to be
> [2009-Apr-07 14:30:00/2009-Apr-07 15:00:000000] ?

The time-interval has open endpoint: [begin..end).
Actually, that's correct: if your interval begins on 14:30 and lasts
1800 sec, it doesn't include the point 15:00.


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