diff options
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 884a805180..ba68b49ad8 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1138,10 +1138,10 @@ func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm) { } if err = models.NewMilestone(&models.Milestone{ - RepoID: ctx.Repo.Repository.ID, - Name: form.Title, - Content: form.Content, - Deadline: deadline, + RepoID: ctx.Repo.Repository.ID, + Name: form.Title, + Content: form.Content, + DeadlineUnix: util.TimeStamp(deadline.Unix()), }); err != nil { ctx.Handle(500, "NewMilestone", err) return @@ -1210,7 +1210,7 @@ func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm) { } m.Name = form.Title m.Content = form.Content - m.Deadline = deadline + m.DeadlineUnix = util.TimeStamp(deadline.Unix()) if err = models.UpdateMilestone(m); err != nil { ctx.Handle(500, "UpdateMilestone", err) return @@ -1243,7 +1243,7 @@ func ChangeMilestonStatus(ctx *context.Context) { ctx.Redirect(ctx.Repo.RepoLink + "/milestones?state=open") case "close": if !m.IsClosed { - m.ClosedDate = time.Now() + m.ClosedDateUnix = util.TimeStampNow() if err = models.ChangeMilestoneStatus(m, true); err != nil { ctx.Handle(500, "ChangeMilestoneStatus", err) return |