]> source.dussan.org Git - gitea.git/commitdiff
Fix timezone bug when clicking heatmap (#15141)
authormayswind <i@mayswind.net>
Thu, 1 Apr 2021 10:52:17 +0000 (18:52 +0800)
committerGitHub <noreply@github.com>
Thu, 1 Apr 2021 10:52:17 +0000 (12:52 +0200)
models/action.go

index 49a6efdc98173db8b869727a8b20f3c63f30b117..2a84133bf8901d1ecd336d45c83d9e7a59e1d12b 100644 (file)
@@ -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 {