This happens both in: - the all builds table - the project builds table To reproduce, build something with Toaster. Once the build is done, go to the all builds table and open the completed on filters. Select the 'yesterday's builds' option. You will see the build you just run listed there.
It turns out that "today" was also broken, at least for all people outside of UTC+0 (e.g. London). That is because "timezone.now()" is always UTC+0 regardless of the current time zone, and you have to use "timezone.localtime(timezone.now())" instead. Also, while "strftime("%Y-%m-%d")" gives free truncation to the beginning of the day, in YP-1.8 that is for some reason no longer being used in the selector count fields for the pop-up, so it has to be compensated for. Here is new code to calculate for both the local time zone and the explicit beginning of days. # calculate the exact begining of local today and yesterday today_begin = timezone.localtime(timezone.now()); todays_seconds = int(today_begin.strftime("%H"))*60*60+int(today_begin.strftime("%M"))*60+int(today_begin.strftime("%S")); today_begin = timezone.now()-timedelta(seconds=todays_seconds); yesterday_begin = today_begin-timedelta(days=1); ... and this example filter ... ("Today's builds" , 'created__gte:'+str(today_begin), queryset_all.filter(created__gte=today_begin).count()), ("Yesterday's builds", 'created__gte!created__lt:' +yesterday_begin.strftime("%Y-%m-%d")+'!' +today_begin.strftime("%Y-%m-%d"), queryset_with_search.filter( created__gte=yesterday_begin, created__lt=today_begin ).count()),
( and yes I did test it watching the clock in California go from 11:59pm to 12.01am for the next day, and observe the expected shift in "today's" and "yesterday's" build counts and filtering)
Verified.