fix output timestamps in groupby queries with granularity "all".