Skip to content
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

MIlestones with 2/29 due date display as 2/28 #29034

Closed
janie314 opened this issue Feb 3, 2024 · 14 comments · Fixed by #29725
Closed

MIlestones with 2/29 due date display as 2/28 #29034

janie314 opened this issue Feb 3, 2024 · 14 comments · Fixed by #29725
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@janie314
Copy link

janie314 commented Feb 3, 2024

Description

As simple as it sounds. Create a milestone with due date 2/29/2024, and it will display as 2/28/2024.

image

Gitea Version

1.21.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.40.1

Operating System

Gentoo

How are you running Gitea?

Gentoo gitea package

Database

SQLite

@eeyrjmr
Copy link
Contributor

eeyrjmr commented Feb 3, 2024

uuur leapyear bug

@yardenshoham
Copy link
Member

Hmmm I can't reproduce
image

Can you give a link to the demo site with reproduction?

@janie314
Copy link
Author

janie314 commented Feb 3, 2024

@yardenshoham
Copy link
Member

Looks ok on my side

image

What's your timezone?

@techknowlogick
Copy link
Member

Yup. This is based on timezone. The value is stored as a date in the db, but then the time library displays it as a datetime and due to midnight utc being different it shows as a different day.

@janie314
Copy link
Author

janie314 commented Feb 3, 2024

I see- thanks all!

Looks like there is no per-user timezone setting for Gitea. I suppose we can either close this or leave this issue open as an enhancement request for that.

@techknowlogick
Copy link
Member

I'd suggest keeping this open, as the due date should probably be treated as a date.

@yardenshoham
Copy link
Member

How to reproduce? Should I set a different timezone in my OS? Currently on GMT+2

@techknowlogick
Copy link
Member

@yardenshoham yeah, likely changing your timezone to any one lower than UTC-0. As then "midnight" utc will a different day.

@yardenshoham
Copy link
Member

Thanks, I was able to reproduce. How should we handle this? Maybe parse the user's timezone and set the milestone to the user's midnight?

@janie314
Copy link
Author

janie314 commented Feb 4, 2024

Hmhm. Currently, Gitea does not have an default timezone setting and uses its server's timezone, as I understand.

I suggest:

  • Next to this date input (and other similar date inputs), we note the Gitea server's timezone (America/Chicago, UTC, etc.)

Because with the original issue submitted- the issue was that the date I chose was secretly converted to a date in the server's timezone. So- server-timezone dates are the dates we use, in reality, so just making a small note of that will be a straightforward resolution.

@lunny
Copy link
Member

lunny commented Feb 5, 2024

Or we can have a timezone selection near the date.

@yp05327
Copy link
Contributor

yp05327 commented Feb 7, 2024

issue also has dealine, maybe have same problem.

@yardenshoham yardenshoham added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Feb 23, 2024
@silverwind
Copy link
Member

silverwind commented Mar 9, 2024

I agree with #29034 (comment), we should reduce these datetime (yyyy-mm-dd HH:mm) in the database to date (yyy-mm-dd) via migration.

silverwind added a commit that referenced this issue Mar 12, 2024
Alternative to: #29698
Fixes: #29034

<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba">

It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:

<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 12, 2024
Alternative to: go-gitea#29698
Fixes: go-gitea#29034

<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba">

It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:

<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">
silverwind added a commit that referenced this issue Mar 13, 2024
Backport #29725 by @silverwind

Alternative to: #29698
Fixes: #29034

<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba">

It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:

<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">

Co-authored-by: silverwind <me@silverwind.io>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 20, 2024
Alternative to: go-gitea/gitea#29698
Fixes: go-gitea/gitea#29034

<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba">

It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:

<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">

(cherry picked from commit 857243bed7f9dccdc597c2941df41e821781cb0f)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
7 participants