New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: For deadline #5890 #5981

wants to merge 2 commits into
base: master


4 participants
Copy link

neolithos commented Feb 6, 2019

Fix deadline problem.
Tested in timezone Berlin.


This comment has been minimized.

Copy link

codecov-io commented Feb 6, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@7a72aa6). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5981   +/-   ##
  Coverage          ?   38.86%           
  Files             ?      345           
  Lines             ?    49508           
  Branches          ?        0           
  Hits              ?    19243           
  Misses            ?    27482           
  Partials          ?     2783
Impacted Files Coverage Δ
routers/api/v1/repo/issue.go 23.46% <0%> (ø)
models/issue.go 47.4% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a72aa6...564ee11. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 label Feb 6, 2019

@@ -414,7 +414,7 @@ func UpdateIssueDeadline(ctx *context.APIContext, form api.EditDeadlineOption) {
var deadline time.Time
if form.Deadline != nil && !form.Deadline.IsZero() {
deadline = time.Date(form.Deadline.Year(), form.Deadline.Month(), form.Deadline.Day(),
23, 59, 59, 0, form.Deadline.Location())
0, 0, 0, 0, setting.UILocation)

This comment has been minimized.


techknowlogick Feb 6, 2019


This reverses another fix for a bug, in reality we shouldn't be using exact times for deadlines but instead we should be using days.

This comment has been minimized.


neolithos Feb 7, 2019


In my projects I persist nomally a date as a timestamp with time set to zero as UTC. During load I add the timezone without changing the time (still zero).

In this change I try to do this with what I understand. But this needs more deeper changes on the db-engine. For me go-lang and the used tools are currently "magic".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment