Copilot commented on code in PR #15432:
URL: https://github.com/apache/grails-core/pull/15432#discussion_r2854721736
##########
grails-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/DateMarshaller.java:
##########
@@ -34,21 +34,25 @@
*/
public class DateMarshaller implements ObjectMarshaller<XML> {
- private final Format formatter;
+ private static final DateTimeFormatter DEFAULT_FORMATTER =
+ DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS z")
Review Comment:
The date pattern has been changed from "yyyy-MM-dd HH:mm:ss.S z" (single 'S'
for milliseconds) to "yyyy-MM-dd HH:mm:ss.SSS z" (triple 'S'). This changes the
output format and is not backward compatible. A date with milliseconds value 5
would previously be formatted as "5" but will now be formatted as "005". This
could break existing clients that parse these dates. Consider using the
original pattern "yyyy-MM-dd HH:mm:ss.S z" to maintain backward compatibility.
```suggestion
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S z")
```
--
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]