+1 Gary
On Wed, Mar 11, 2020 at 12:55 AM Ralph Goers <[email protected]> wrote: > I have modified TimeFilter to properly account for the change from > daylight saving time to standard time and vice-versa. I also modified it to > handle a start time on the day before the end time. I have a suspicion > that this filter is being lightly used because there are a whole lot of use > cases where it wouldn’t work correctly. > > The problem is that to fix it I had to use java.time. TimeFilter is > flagged as being allocation free but java.time is anything but that. Almost > every method creates a new immutable object. I tried modifying the logic > to use Calendar but I cannot figure out how to make it account for the > overlapping hour in the fall whereas java.time easily handles that. > > As a consequence I am thinking that I will remove the garbage free > annotation from the filter. All this means is that it will perform > allocations once per day. > > Any objections? > > Ralph > > > On Mar 9, 2020, at 12:12 AM, Apache <[email protected]> wrote: > > > > I started testing this. It doesn’t handle daylight savings at all and > some of the tests make no sense. I’m rewriting it using java.time and > implementing better tests. > > > > Ralph > > > >> On Mar 8, 2020, at 11:19 AM, Ralph Goers <[email protected]> > wrote: > >> > >> Is anyone else having problems with TimeFilterTest in core today? I > am in Arizona so we did not spring forward as we are MST all year. I see > the test is setting a timezone of America/Los Angeles. > >> > >> Ralph > > > > > > > > >
