Skip to content

Conversation

@martinstuecklschwaiger
Copy link
Contributor

@martinstuecklschwaiger martinstuecklschwaiger commented Jan 30, 2025

Fixes #1799.

DateTime becomes readable on Sentry.

Before they were serialized like this: Object DateTimeImmutable.
They now are serialized as DateTimeImmutable(2001-02-03 13:37:42).

@martinstuecklschwaiger
Copy link
Contributor Author

If we allowed class serializers to return scalar data as well (not only arrays), we could also make this a default serializer.

Copy link
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thank you!

@cleptric cleptric merged commit c2c5c3a into getsentry:master Feb 18, 2025
37 checks passed
@martinstuecklschwaiger martinstuecklschwaiger deleted the serialize-date branch February 18, 2025 14:23
@cleptric
Copy link
Member

This was released as part of 4.11.0.

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.

Serialize DateTimeInterface

2 participants