phptimestore based average data