Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Serializer] AddPRESERVE_CONTEXT_TIMEZONE_KEY toDateTimeNormalizer#20860

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
frankdekker wants to merge3 commits intosymfony:7.3
base:7.3
Choose a base branch
Loading
fromfrankdekker:PR_59807

Conversation

@frankdekker
Copy link

@frankdekkerfrankdekker commentedApr 5, 2025
edited by OskarStark
Loading

Adds DateTimeNormalizer::PRESERVE_CONTEXT_TIMEZONE_KEY to theDateTimeNormalizer section

Documentation for:

@carsonbotcarsonbot added this to the7.3 milestoneApr 5, 2025
@OskarStarkOskarStark added the Waiting Code MergeDocs for features pending to be merged labelApr 6, 2025
@carsonbotcarsonbot modified the milestones:7.3,nextApr 6, 2025
@OskarStarkOskarStark changed the title[Serializer] Add PRESERVE_CONTEXT_TIMEZONE_KEY to DateTimeNormalizer[Serializer] AddPRESERVE_CONTEXT_TIMEZONE_KEY toDateTimeNormalizerJun 19, 2025
Adds DateTimeNormalizer::PRESERVE_CONTEXT_TIMEZONE_KEY to the `DateTimeNormalizer` section
nicolas-grekas added a commit to symfony/symfony that referenced this pull requestNov 1, 2025
…izer` during denormalization (frankdekker)This PR was squashed before being merged into the 7.4 branch.Discussion----------[Serializer] Allow forcing timezone in `DateTimeNormalizer` during denormalization| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Issues        |Fix#59807| License       | MITBy default the `DateTimeNormalizer` will denormalize timestamps and date strings that include a timezone to `DateTime` objects with respective timezone UTC or the timezone from the date string. Even with the context key `TIMEZONE_KEY` set, the timezone from the input superceeds the context timezone.This PR allows to set `PRESERVE_CONTEXT_TIMEZONE_KEY` context to `true` (default: `false`), which in combination with `TIMEZONE_KEY` will set the Timezone of the denormalized DateTimes to the given timezone. The timezone from the input will be overwritten.### Documentationsymfony/symfony-docs#20860Commits-------bd1a4d0 [Serializer] Allow forcing timezone in `DateTimeNormalizer` during denormalization
Change version to 7.4Co-authored-by: Matty Driessen <mdriessen@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@mdriessenmdriessenmdriessen left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

SerializerStatus: Needs ReviewWaiting Code MergeDocs for features pending to be merged

Projects

None yet

Milestone

next

Development

Successfully merging this pull request may close these issues.

4 participants

@frankdekker@mdriessen@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp