From 794049e824f22c78e5854283a8aa56bda62b7c58 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 31 Oct 2018 23:56:32 +0300 Subject: fix compatibility heatmap with mysql 8 (#5232) --- models/user_heatmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/user_heatmap.go b/models/user_heatmap.go index a86ae39fce..f9575ed50f 100644 --- a/models/user_heatmap.go +++ b/models/user_heatmap.go @@ -23,7 +23,7 @@ func GetUserHeatmapDataByUser(user *User) ([]*UserHeatmapData, error) { case setting.UseSQLite3: groupBy = "strftime('%s', strftime('%Y-%m-%d', created_unix, 'unixepoch'))" case setting.UseMySQL: - groupBy = "UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(created_unix), '%Y%m%d'))" + groupBy = "UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(created_unix)))" case setting.UsePostgreSQL: groupBy = "extract(epoch from date_trunc('day', to_timestamp(created_unix)))" case setting.UseMSSQL: -- cgit v1.2.3