From: mayswind Date: Thu, 1 Apr 2021 10:52:17 +0000 (+0800) Subject: Fix timezone bug when clicking heatmap (#15141) X-Git-Tag: v1.15.0-rc1~540 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9b316a327e900bcef969795e0e563051cc8c4f1b;p=gitea.git Fix timezone bug when clicking heatmap (#15141) --- diff --git a/models/action.go b/models/action.go index 49a6efdc98..2a84133bf8 100644 --- a/models/action.go +++ b/models/action.go @@ -382,7 +382,7 @@ func activityQueryCondition(opts GetFeedsOptions) (builder.Cond, error) { } if opts.Date != "" { - dateLow, err := time.Parse("2006-01-02", opts.Date) + dateLow, err := time.ParseInLocation("2006-01-02", opts.Date, setting.DefaultUILocation) if err != nil { log.Warn("Unable to parse %s, filter not applied: %v", opts.Date, err) } else {