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

Closed
opened 2025-11-02 10:09:27 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @janie314 on GitHub (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

Originally created by @janie314 on GitHub (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](https://github.com/go-gitea/gitea/assets/61095764/082bc9a1-d473-40c4-8c6e-37838f611d5f) ### 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
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 10:09:27 -06:00
Author
Owner

@eeyrjmr commented on GitHub (Feb 3, 2024):

uuur leapyear bug

@eeyrjmr commented on GitHub (Feb 3, 2024): uuur leapyear bug
Author
Owner

@yardenshoham commented on GitHub (Feb 3, 2024):

Hmmm I can't reproduce
image

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

@yardenshoham commented on GitHub (Feb 3, 2024): Hmmm I can't reproduce ![image](https://github.com/go-gitea/gitea/assets/20454870/fcc61bb6-4e59-4c0a-81b9-60c9c15df779) Can you give a link to the demo site with reproduction?
Author
Owner

@janie314 commented on GitHub (Feb 3, 2024):

See https://try.gitea.io/janie314/SDFSDF/milestones @yardenshoham

@janie314 commented on GitHub (Feb 3, 2024): See https://try.gitea.io/janie314/SDFSDF/milestones @yardenshoham
Author
Owner

@yardenshoham commented on GitHub (Feb 3, 2024):

Looks ok on my side

image

What's your timezone?

@yardenshoham commented on GitHub (Feb 3, 2024): Looks ok on my side ![image](https://github.com/go-gitea/gitea/assets/20454870/88f9545c-9807-4571-ba70-59605ff1aab7) What's your timezone?
Author
Owner

@techknowlogick commented on GitHub (Feb 3, 2024):

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.

@techknowlogick commented on GitHub (Feb 3, 2024): 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.
Author
Owner

@janie314 commented on GitHub (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.

@janie314 commented on GitHub (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.
Author
Owner

@techknowlogick commented on GitHub (Feb 4, 2024):

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

@techknowlogick commented on GitHub (Feb 4, 2024): I'd suggest keeping this open, as the due *date* should probably be treated as a date.
Author
Owner

@yardenshoham commented on GitHub (Feb 4, 2024):

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

@yardenshoham commented on GitHub (Feb 4, 2024): How to reproduce? Should I set a different timezone in my OS? Currently on GMT+2
Author
Owner

@techknowlogick commented on GitHub (Feb 4, 2024):

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

@techknowlogick commented on GitHub (Feb 4, 2024): @yardenshoham yeah, likely changing your timezone to any one lower than UTC-0. As then "midnight" utc will a different day.
Author
Owner

@yardenshoham commented on GitHub (Feb 4, 2024):

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?

@yardenshoham commented on GitHub (Feb 4, 2024): 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?
Author
Owner

@janie314 commented on GitHub (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.

@janie314 commented on GitHub (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.
Author
Owner

@lunny commented on GitHub (Feb 5, 2024):

Or we can have a timezone selection near the date.

@lunny commented on GitHub (Feb 5, 2024): Or we can have a timezone selection near the date.
Author
Owner

@yp05327 commented on GitHub (Feb 7, 2024):

issue also has dealine, maybe have same problem.

@yp05327 commented on GitHub (Feb 7, 2024): `issue` also has `dealine`, maybe have same problem.
Author
Owner

@silverwind commented on GitHub (Mar 9, 2024):

I agree with https://github.com/go-gitea/gitea/issues/29034#issuecomment-1925503990, we should reduce these datetime (yyyy-mm-dd HH:mm) in the database to date (yyy-mm-dd) via migration.

@silverwind commented on GitHub (Mar 9, 2024): I agree with https://github.com/go-gitea/gitea/issues/29034#issuecomment-1925503990, we should reduce these `datetime` (`yyyy-mm-dd HH:mm`) in the database to `date` (`yyy-mm-dd`) via migration.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12428