Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      I needed the ability to user a function like the
      org.apache.commons.lang.time.DateUtils.parseDate function but I needed to
      consider a different time zone when parsing the dates (assuming the format did
      not have the time zone as part of the input). This is needed for different
      clients to enter local date/time values on their browser and consider their
      defined time zone to convert this to the server/system time zone. I just
      thought an additional parameter to this function would make it more generic
      for this purpose while still keeping the current method signate which would
      use the tiem zone sensitive one with a null or default timezone value.

      Anyway, just thought I'd suggest it.

        Activity

        Hide
        Niall Pemberton added a comment -
        Show
        Niall Pemberton added a comment - Commons Validator 1.3.0 has validate method flavours that include TimeZone: http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/package-summary.html#date.timezone
        Hide
        Stephen Colebourne added a comment -

        Not sure what you mean by hacky. Where do you see the issue?

        The new method would just create the parser, set the zone on it, and then do the parse.

        Show
        Stephen Colebourne added a comment - Not sure what you mean by hacky. Where do you see the issue? The new method would just create the parser, set the zone on it, and then do the parse.
        Hide
        Henri Yandell added a comment -

        I'm resolving this as a WONTFIX because I can't see a non-hacky way to implement it and I believe it's best for hacky solutions to remain in the apps, not the libs.

        Show
        Henri Yandell added a comment - I'm resolving this as a WONTFIX because I can't see a non-hacky way to implement it and I believe it's best for hacky solutions to remain in the apps, not the libs.
        Hide
        Henri Yandell added a comment -

        Code-wise, all I can see is that we add the following:

        " Z" to the pattern and " "+timezone to the input

        This seems pretty weak. Any better ideas?

        Show
        Henri Yandell added a comment - Code-wise, all I can see is that we add the following: " Z" to the pattern and " "+timezone to the input This seems pretty weak. Any better ideas?

          People

          • Assignee:
            Unassigned
            Reporter:
            Bill Boland
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development