summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorStanislav <me@gaydin.io>2018-10-31 23:56:32 +0300
committertechknowlogick <hello@techknowlogick.com>2018-10-31 16:56:32 -0400
commit794049e824f22c78e5854283a8aa56bda62b7c58 (patch)
tree6f23650c7b746b04908def3c803e429790ac4500 /models
parent7edb930240fdd35dc121d859f1cec23ac7c6300a (diff)
downloadgitea-794049e824f22c78e5854283a8aa56bda62b7c58.tar.gz
gitea-794049e824f22c78e5854283a8aa56bda62b7c58.zip
fix compatibility heatmap with mysql 8 (#5232)
Diffstat (limited to 'models')
-rw-r--r--models/user_heatmap.go2
1 files changed, 1 insertions, 1 deletions
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: