-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Issue due date is always one day plus #5890
Comments
It's intended that the deadline should be the end of the day so the raw deadline datetime has 23:59:59 added to it. It sounds like the deadline date isn't being corrected for your timezone. Of course, I'm on GMT so I can't easily replicate this... In fact it looks like your server thinks it's in UTC so it's reporting a deadline datetime that would push it into the next day for you. |
Then |
What can I give, to resolve this issue? |
Heya, sorry was busy with other things. Feel free to put a pr up. I guess the question is how to test this what we don't want is to be in the opposite situation. My personal feeling is that we shouldn't be using datetimes to represent dates so if I get involved in writing a pr those will have to die. Sorry fat fingers with the close. |
My go-lang knowledge are basicly zero, I can only help to build the master and test the solution. But I picked a little bit around: Is this correct. Should I send this as pr? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
As of today I am still stumbling over this problem. Gitea Version: 1.11.4. A simple solution would be to add 12:00 hours to the date rather than 23:59:59. Then the timezone can shift 11:59:59 in both directions. The time per se is not needed anyways, only the date.
I do not know how to create PRs. Marc |
@dimpfelmoser https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request can help you :) and for the issue 🤔 instead of calculating afterwards, we may should calculate the correct time on due-date creation and insert this one ... |
Is there a compelling use case to include time (as in, is the time being used somewhere?)? I think it would be easier to consider this a date unless there is a compelling reason to include time. |
Looks like this one is fixed in 1.12.0-rc2 by this PR #11697 I was affected by this bug and it's working for me since I updated to 1.12.0-rc2 |
Closing as fixed by #11697 |
[x]
):Description
I set a issue due date, and it shows the date in views one day plus.
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
gitea/routers/api/v1/repo/issue.go
Lines 413 to 419 in 8917d66
Get
gitea/models/issue.go
Line 384 in 8917d66
AsTimePtr
add's the local timezone, if i understand it correct.The text was updated successfully, but these errors were encountered: