Nibz whop chart ten

This is silly expensive and im pretty sure if you get any amount of usage it will fall over almost immediately. Youre looping over every 'deployment', doing date time conversion, some division, and then bucketing and sorting *per request*?

This really needs to get done either asynchronously or on insersion. Until then, why not sort the deployments by date in the query and then bucket them by walking the list in order and keeping a ref to the current bucket? You should be able to do this without any special conversions, division, or list reveral then.