Date is fine.

The org.apache.struts2.components.Date class can handle other types ie LocalDateTime, LocalDate, Instant bean types, I can only test the java.util.Date variant.

(..saying that, it would most probably work as LocalDate is the only new variant introduced on this change.)

It works well for me.  Thanks.

On 22/02/2022 12:12, Lukasz Lenart wrote:
wt., 22 lut 2022 o 09:53 Greg Huber <gregh3...@gmail.com> napisał(a):
Checking my beans, all of my dates are of type java.sql.Timestamp
(datetime on mariadb)

On class

Date.end(Writer writer, String body)

matches java.util.Date

Object dateObject = findValue(name);
          if (dateObject instanceof java.util.Date) {
              date = ((java.util.Date) dateObject).toInstant().atZone(tz);
          }

I don't have any LocalDateTime (java.time) fields to test (would use
myBean.getMyDate().toLocalDateTime() as MyDate is Timestamp and then use
the java.time classes, dates now have become messy🙁).
Not sure if I get it, current implementation supports: java.util.Data,
Calendar and long - we can add Timestamp if you want to
https://github.com/apache/struts/pull/529/files#diff-1c3207a9251750c4fe4529e15387d4a1b61c21e96cec9dcb98a4a2aa1354b2beR296-R307


Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to