Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Java 8 Date/Time API in parameters #125

Closed
dtaimanov opened this issue Oct 23, 2020 · 3 comments
Closed

Support for Java 8 Date/Time API in parameters #125

dtaimanov opened this issue Oct 23, 2020 · 3 comments
Assignees
Labels
type: enhancement New feature or request
Milestone

Comments

@dtaimanov
Copy link
Contributor

dtaimanov commented Oct 23, 2020

Environment:

  • Platform version: 7.2
  • Addon version: 7.2

Description:

Detais: https://www.cuba-platform.com/discuss/t/rest-api-support-for-java-8-time-module-java-time/13874

Technical description: RestParseUtils#toObject(Type,String,String) doesn't support LocalDate and other Java 8 Date/Time API types.
Support could be implemented either on RestParseUtils or on EntitySerializationAPI level.

@knstvk
Copy link
Member

knstvk commented Feb 4, 2021

The same problem with query parameters: https://www.cuba-platform.com/discuss/t/rest-query-on-localdate-possible-bug/14672

@lovtsovaik
Copy link

Need to support also java.sql.Time

plakhov added a commit that referenced this issue Mar 3, 2021
plakhov added a commit that referenced this issue Mar 3, 2021
plakhov added a commit that referenced this issue Mar 3, 2021
plakhov added a commit that referenced this issue Mar 4, 2021
plakhov added a commit that referenced this issue Mar 4, 2021
@lovtsovaik
Copy link

Examples of values:

  • java.time.LocalDate: "2010-10-10",
  • java.time.LocalDateTime: "2010-10-10 15:15:15.001",
  • java.time.LocalTime: "15:15:15",
  • java.time.OffsetDateTime: "2010-10-10 15:15:15.001 +0300",
  • java.time.OffsetTime: "15:15:15 +0300"

Examples of values for not java.time.*:

  • java.sql.Time: "15:15:15",
  • java.util.Date: "2010-10-10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants