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

[Messenger] Store dates in UTC when using Doctrine #50287

Merged
merged 1 commit into from
May 12, 2023

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented May 10, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Spotted by running the receiver in an UTC container and the sender in a non-UTC process.

@nicolas-grekas nicolas-grekas changed the base branch from 5.4 to 6.3 May 12, 2023 07:56
@fabpot
Copy link
Member

fabpot commented May 12, 2023

Thank you @nicolas-grekas.

@DesLynx
Copy link

DesLynx commented Jul 24, 2023

Hi @nicolas-grekas !
Do you think this change should be reflected in the messenger documentation? There's an alert for the use of the doctrine transport when writing in the same database from different server potentially using a different timezone. But I came across an issue due to this change.
Although both my servers use the same timezone they don't run the same symfony version (one is 5.4 the other 6.3) and so when the server running on 5.4 sends a message to the one on 6.3 it write the message as available in its timezone but the server on 6.3 look for message available in the UTC timezone...
Bonus idea: I would have appreciate to be allowed to specified the timezone to use for a transport via an option in the transport config (with a default value set to UTC to stay compliant with this change). This would also allow for an easy fix for servers in different timezone.

@nicolas-grekas
Copy link
Member Author

@DesLynx it could make sense to document this yes, even if it's mostly internal state. PR welcome. About making this configurable, what would be the purpose? I'm not sure it would enable any valid use case. Better sync settle everything on UTC.

xabbuh added a commit that referenced this pull request Dec 27, 2023
…nnection tests (xabbuh)

This PR was merged into the 6.3 branch.

Discussion
----------

[Messenger] consistently use dates in UTC in Doctrine connection tests

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

related to #50287 and #53187

Commits
-------

10801e1 consistently use dates in UTC in Doctrine connection tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants