summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorTobias Kunicke <tobias@kunicke.eu>2016-02-06 00:10:32 +0100
committerTobias Kunicke <tobias@kunicke.eu>2016-02-06 00:10:32 +0100
commitbc0eee48d5750bc57bd7f4b4a485222a91357220 (patch)
tree1a65544956297ba76c1afb423b2de25794b83114 /routers
parentfa5a1cb54f70ffab621f13749d835983101a50f4 (diff)
downloadgitea-bc0eee48d5750bc57bd7f4b4a485222a91357220.tar.gz
gitea-bc0eee48d5750bc57bd7f4b4a485222a91357220.zip
parse milestone.deadline as local time
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 57852a5ad3..635dee930e 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -1079,7 +1079,7 @@ func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) {
if len(form.Deadline) == 0 {
form.Deadline = "9999-12-31"
}
- deadline, err := time.Parse("2006-01-02", form.Deadline)
+ deadline, err := time.ParseInLocation("2006-01-02", form.Deadline, time.Local)
if err != nil {
ctx.Data["Err_Deadline"] = true
ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form)
@@ -1139,7 +1139,7 @@ func EditMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) {
if len(form.Deadline) == 0 {
form.Deadline = "9999-12-31"
}
- deadline, err := time.Parse("2006-01-02", form.Deadline)
+ deadline, err := time.ParseInLocation("2006-01-02", form.Deadline, time.Local)
if err != nil {
ctx.Data["Err_Deadline"] = true
ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form)