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

Replace DateTime with DateUtils #32383

Merged
merged 3 commits into from
Nov 2, 2024
Merged

Conversation

wxiaoguang
Copy link
Contributor

This is the first step to make the "date/time" clear (especially for the milestone deadline)

The plan is:

  1. Introduce a better "DateUtils" to replace the legacy "DateTime" (which was patched a lot)
  2. Use datetime with timezone for the milestone deadline (next step)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 30, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 30, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Oct 30, 2024
@wxiaoguang wxiaoguang mentioned this pull request Oct 30, 2024
@wxiaoguang wxiaoguang force-pushed the fix-datetime branch 3 times, most recently from 9456c95 to c9790cf Compare October 30, 2024 14:56
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 30, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 2, 2024
@wxiaoguang wxiaoguang enabled auto-merge (squash) November 2, 2024 03:30
@wxiaoguang wxiaoguang merged commit fec6b3d into go-gitea:main Nov 2, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Nov 2, 2024
@wxiaoguang wxiaoguang deleted the fix-datetime branch November 2, 2024 04:09
@wxiaoguang
Copy link
Contributor Author

-> Replace DateTime with proper functions #32402

@lunny lunny modified the milestones: 1.24.0, 1.23.0 Nov 2, 2024
wxiaoguang added a commit that referenced this pull request Nov 2, 2024
Follow #32383

This PR cleans up the "Deadline" usages in templates, make them call
`ParseLegacy` first to get a `Time` struct then display by `DateUtils`.

Now it should be pretty clear how "deadline string" works, it makes it
possible to do further refactoring and correcting.
@wxiaoguang
Copy link
Contributor Author

Next: Refactor DateUtils and merge TimeSince #32409

wxiaoguang added a commit that referenced this pull request Nov 4, 2024
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Nov 6, 2024
Follow go-gitea/gitea#32383

This PR cleans up the "Deadline" usages in templates, make them call
`ParseLegacy` first to get a `Time` struct then display by `DateUtils`.

Now it should be pretty clear how "deadline string" works, it makes it
possible to do further refactoring and correcting.

(cherry picked from commit 259811617ba15c77ddd89360178a59251d611af2)
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 6, 2024
* giteaofficial/main: (21 commits)
  Use 8 as default value for git lfs concurrency (go-gitea#32421)
  Fix milestone deadline and date related problems (go-gitea#32339)
  Only query team tables if repository is under org when getting assignees (go-gitea#32414)
  Refactor RepoRefByType (go-gitea#32413)
  Refactor template ctx and render utils (go-gitea#32422)
  Refactor DateUtils and merge TimeSince (go-gitea#32409)
  Refactor markup package (go-gitea#32399)
  Add some handy markdown editor features (go-gitea#32400)
  Make LFS http_client parallel within a batch. (go-gitea#32369)
  Refactor repo legacy (go-gitea#32404)
  Replace DateTime with proper functions (go-gitea#32402)
  Fix git error handling (go-gitea#32401)
  Fix created_unix for mirroring (go-gitea#32342)
  Replace DateTime with DateUtils (go-gitea#32383)
  improve performance of diffs (go-gitea#32393)
  Refactor tests to prevent from unnecessary preparations (go-gitea#32398)
  Add artifacts test fixture (go-gitea#30300)
  Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (go-gitea#32365)
  Fix a number of typescript issues (go-gitea#32308)
  Update go dependencies (go-gitea#32389)
  ...
yp05327 added a commit to yp05327/gitea that referenced this pull request Nov 7, 2024
yp05327 added a commit to yp05327/gitea that referenced this pull request Nov 7, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants