codeconsole commented on code in PR #15121:
URL: https://github.com/apache/grails-core/pull/15121#discussion_r2417464134
##########
grails-views-gson/src/main/groovy/grails/plugin/json/converters/ZonedDateTimeJsonConverter.groovy:
##########
@@ -41,6 +41,6 @@ class ZonedDateTimeJsonConverter implements
JsonGenerator.Converter {
@Override
Object convert(Object value, String key) {
- DateTimeFormatter.ISO_ZONED_DATE_TIME.format((ZonedDateTime) value)
+ DateTimeFormatter.ISO_OFFSET_DATE_TIME.format((ZonedDateTime) value)
Review Comment:
@matrei in order to match Spring Boot Jackson output:
```
ZonedDateTime value = ZonedDateTime.now()
println DateTimeFormatter.ISO_ZONED_DATE_TIME.format((ZonedDateTime) value)
println DateTimeFormatter.ISO_OFFSET_DATE_TIME.format((ZonedDateTime) value)
```
```
2025-10-09T17:27:04.791062156Z[UTC]
2025-10-09T17:27:04.791062156Z
```
Spring Boot produces "zonedDateTime": "2025-10-08T00:48:46.407254-07:00",
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]