You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "codeconsole (via GitHub)" <gi...@apache.org> on 2025/10/22 22:25:45 UTC

[PR] default fields dates to datetime precision [grails-core]

codeconsole opened a new pull request, #15165:
URL: https://github.com/apache/grails-core/pull/15165

   Alternative solution for `<f:all` rendering of date objects with time precision.
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] default fields dates to datetime precision [grails-core]

Posted by "codeconsole (via GitHub)" <gi...@apache.org>.
codeconsole commented on PR #15165:
URL: https://github.com/apache/grails-core/pull/15165#issuecomment-3438032666

   > So, if I understand this correctly, before this change, the `date.format` and `default.date.format` message properties were used to decide the formatting. Now, it will always use `FormatStyle.SHORT` for both date and time + timezone.
   > 
   > Also, should all these types be formatted with timezone?
   
   @matrei this ticket will be for coming up with a final solution
   https://github.com/apache/grails-core/issues/15164
   
   I described the current behavior there:
   
   https://github.com/apache/grails-core/blob/c27742f9ad64b361ad39dabe9e090e938dc256ca/grails-fields/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy#L949-L973 
   
   
   currently `g.formatDate(date: model.value)` is called which result in no type so that results in a default format:
   
   https://github.com/apache/grails-core/blob/c27742f9ad64b361ad39dabe9e090e938dc256ca/grails-gsp/plugin/src/main/groovy/org/grails/plugins/web/taglib/FormatTagLib.groovy#L187
   
   all this ticket does is set the type to datetime which results in the following behavior;
   
   https://github.com/apache/grails-core/blob/c27742f9ad64b361ad39dabe9e090e938dc256ca/grails-gsp/plugin/src/main/groovy/org/grails/plugins/web/taglib/FormatTagLib.groovy#L193-L201


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] default fields dates to datetime precision [grails-core]

Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on PR #15165:
URL: https://github.com/apache/grails-core/pull/15165#issuecomment-3443297568

   I might have misread your tables above.
   However, I don't seem to be getting the output formatting from the first table when applying this patch locally.


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] default fields dates to datetime precision [grails-core]

Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on PR #15165:
URL: https://github.com/apache/grails-core/pull/15165#issuecomment-3443150625

   I'm OK with this being a two-step solution to not break backwards-compatibility, but I don't think we should output timezone for types that do not hold that information.
   
   How would that be able to render the stored value correctly? For example, a user in timezone `CEST` enters a value in a `LocalDateTime` field. The `LocalDateTime` type does not store timezone information. The server that renders this value will use `ZoneId.systemDefault()` and output for example `PDT` which is a completely different time than what the user has entered.


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] default fields dates to datetime precision [grails-core]

Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on PR #15165:
URL: https://github.com/apache/grails-core/pull/15165#issuecomment-3437783417

   So, if I understand this correctly, before this change, the `date.format` and `default.date.format` message properties were used to decide the formatting. Now, it will always use `FormatStyle.SHORT` for both date and time + timezone.
   
   Also, should all these types be formatted with timezone?


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] default fields dates to datetime precision [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #15165:
URL: https://github.com/apache/grails-core/pull/15165


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org