Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-7121

Support for custom global Joda DateTimeFormatters

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.2 RC1
    • Component/s: Core
    • Last commented by a User:
      false

      Description

      I'd like to be able to configure the Joda Time parser globally, to parse all the dates in common format. There is no documentation on it. In my case I'd like to have it configured so that it parses all dates and times in valid ISO format (org.joda.time.format.ISODateTimeFormat.dateTimeParser() | dateParser() | dateOptionalTimeParser() | timeParser()). I was able to write my own converter to do it, but if Spring has JodaTime support built-in, than I'd expect to be able to do it without writing any code.
      In my case, we have RESTful service based on Spring. All dates which are accepted by the service must be in ISO format. Then, it makes sense to set this format once, globally, in spring context config file probably.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwebb Phil Webb
                Reporter:
                grzegorzborkowski Grzegorz Borkowski
                Last updater:
                Sam Brannen
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 33 weeks, 1 day ago