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

[messages] datetime is incorrectly formatted in dialogs API #4086

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

YUCLing
Copy link
Contributor

@YUCLing YUCLing commented Oct 22, 2024

Fixes #0000

Changes proposed in this pull request:
Add correct casts to Dialog and UserDialogState so that the datetime from database is converted to Carbon instead of string.

Without casting, the time displayed on the frontend will be the UTC time treated as local time.

Reviewers should focus on:

Screenshot
Before
2c957f77bfb4c5ba0124756178fd7d19

After
9b0b9fbd54df524d31f81313cc2d6c6b

QA

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@YUCLing YUCLing requested a review from a team as a code owner October 22, 2024 09:45
@SychO9 SychO9 merged commit 6a3be33 into flarum:2.x Oct 22, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants