The Wayback Machine - https://web.archive.org/web/20230117203855/https://github.com/go-gitea/gitea/pull/22302
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

Fix due date rendering the wrong date in issue #22302

Merged
merged 7 commits into from Jan 2, 2023

Conversation

yardenshoham
Copy link
Contributor

Previously, the last minute of the chosen date caused bad timezone rendering.

For example, I chose January 4th, 2023.

Before

<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>

After

<time data-format="date" datetime="2023-01-04">January 4, 2023</time>

Closes #21999

Previously, the last minute of the chosen date caused bad timezone rendering.

For example, I chose January 4th, 2023.

### Before
```html
<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>
```

### After
```html
<time data-format="date" datetime="2023-01-04">January 4, 2023</time>
```

Signed-off-by: Yarden Shoham <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #22302 (c86b304) into main (7cc7db7) will decrease coverage by 0.02%.
The diff coverage is 38.18%.

@@            Coverage Diff             @@
##             main   #22302      +/-   ##
==========================================
- Coverage   48.15%   48.13%   -0.03%     
==========================================
  Files        1043     1043              
  Lines      142324   142404      +80     
==========================================
+ Hits        68536    68545       +9     
- Misses      65608    65670      +62     
- Partials     8180     8189       +9     
Impacted Files Coverage Δ
cmd/dump_repo.go 0.00% <ø> (ø)
models/asymkey/gpg_key.go 55.88% <0.00%> (-0.67%) ⬇️
models/asymkey/ssh_key_fingerprint.go 47.36% <0.00%> (ø)
models/asymkey/ssh_key_parse.go 59.44% <0.00%> (ø)
models/asymkey/ssh_key_principals.go 43.66% <0.00%> (ø)
models/db/context.go 63.47% <0.00%> (-1.71%) ⬇️
models/org_team.go 40.55% <0.00%> (ø)
models/packages/conan/references.go 79.31% <ø> (ø)
models/packages/container/search.go 70.40% <ø> (ø)
models/packages/package.go 50.33% <ø> (ø)
... and 155 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

delvh
delvh approved these changes Jan 1, 2023
lunny
lunny approved these changes Jan 1, 2023
yardenshoham added a commit to yardenshoham/gitea that referenced this pull request Jan 1, 2023
Backport go-gitea#22302

Previously, the last minute of the chosen date caused bad timezone rendering.

For example, I chose January 4th, 2023.

### Before
```html
<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>
```

### After
```html
<time data-format="date" datetime="2023-01-04">January 4, 2023</time>
```

---

Closes go-gitea#21999

Signed-off-by: Yarden Shoham <[email protected]>
@lunny
Copy link
Member

lunny commented Jan 2, 2023

make L-G-T-M work

@lunny lunny merged commit b994b2e into go-gitea:main Jan 2, 2023
2 checks passed
@yardenshoham yardenshoham deleted the fix-due branch Jan 2, 2023
lunny pushed a commit that referenced this pull request Jan 2, 2023
Backport #22302

Previously, the last minute of the chosen date caused bad timezone
rendering.

For example, I chose January 4th, 2023.

### Before
```html
<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>
```

### After
```html
<time data-format="date" datetime="2023-01-04">January 4, 2023</time>
```

---

Closes #21999

Signed-off-by: Yarden Shoham <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 3, 2023
* upstream/main:
  Add deprecated warning for DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR (go-gitea#22318)
  Unify hashing for avatar (go-gitea#22289)
  fix: code search title translation (go-gitea#22285)
  Update Gmail mailer configuration (go-gitea#22291)
  Fix due date rendering the wrong date in issue (go-gitea#22302)
  Fix get system setting bug when enabled redis cache (go-gitea#22295)
  Restructure `webhook` module (go-gitea#22256)
  Reminder for no more logs to console (go-gitea#22282)
  Fix bug of DisableGravatar default value (go-gitea#22296)
  Upgrade go-chi to v5.0.8 (go-gitea#22304)
  [skip ci] Updated licenses and gitignores
  Use ErrInvalidArgument in packages (go-gitea#22268)
  Changelog v1.18.0 (go-gitea#22215) (go-gitea#22269)
  Support estimated count with multiple schemas (go-gitea#22276)
  Add Gentoo to the from package providers (go-gitea#22284)
  Fix sitemap (go-gitea#22272)
  Add `sync_on_commit` option for push mirrors api (go-gitea#22271)
  Fix key signature error page (go-gitea#22229)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Due is shown incorrectly
6 participants