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

ParamConverterProviders should allow format strings if applicable #30

Open
smoyer64 opened this issue Jun 22, 2018 · 0 comments
Open

ParamConverterProviders should allow format strings if applicable #30

smoyer64 opened this issue Jun 22, 2018 · 0 comments

Comments

@smoyer64
Copy link
Contributor

Many ParamConverters assume a default String representation for a specific Java type. Right now, we've standardized on ISO-8601 for Date, Time and Timestamp formats which aligns with the new Java Date/Time library. In the event we have to process other String representations, we should have the ability to customize these converters - two annotations immediately come to mind but there may be more:

  1. @FormatString - Allows the user to specify an alternate format string (for conversions that accept one) or to specify the format string for conversions that require one.

  2. @DefaultTimeZone - Allows the user to specify the time zone to be used if one is not included with the ISO-8601 compliant string. This allows what would otherwise be LocalDateTime objects to be Instant or ZonedDateTime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant