-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implemented
Description
- Gitea version (or commit ref): 8006b1b
- Git version:
- Operating system: Windows 2012 R2 (English, Timezone Germany/Berlin)
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
Description
I set a issue due date, and it shows the date in views one day plus.
- In the database I see the correct timestamp, 1549411199 -> 2019-02-05T23:59:59.
- If I open the editor, there is also the correct stamp -> correct.
- In issue overview, history and the issue it self I see the date always one day plus -> wrong.
- Over due calculation -> correct.
Screenshots
Code
I would fix it, but I have no glue, what is indented. So, I give the lines they are responsible.
Save
gitea/routers/api/v1/repo/issue.go
Lines 293 to 296 in 8917d66
var deadlineUnix util.TimeStamp | |
if form.Deadline != nil && !form.Deadline.IsZero() && ctx.Repo.CanWrite(models.UnitTypeIssues) { | |
deadlineUnix = util.TimeStamp(form.Deadline.Unix()) | |
} |
gitea/routers/api/v1/repo/issue.go
Lines 413 to 419 in 8917d66
var deadlineUnix util.TimeStamp | |
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()) | |
deadlineUnix = util.TimeStamp(deadline.Unix()) | |
} |
Get
Line 384 in 8917d66
apiIssue.Deadline = issue.DeadlineUnix.AsTimePtr() |
AsTimePtr
add's the local timezone, if i understand it correct.
jswolf19
Metadata
Metadata
Assignees
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implemented