Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4442

Do not re-implement ISO date conversion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Outdated
    • Icon: Neutral Neutral
    • None
    • 4.5.3
    • core
    • None

      Currently info.magnolia.jcr.util.PropertyUtil.createValue(String, int, ValueFactory) reimplements String (ISO8601) to Calendar conversion. There's no need to do so. JackRabbit or JoDa have API for such conversion as have many other libraries (e.g. JAXB).
      JackRabbit:
      Calendar cal = org.apache.jackrabbit.util.ISO8601.parse(s);
      Calendar cal = org.apache.jackrabbit.core.util.ISO8601.parse(s);
      JoDa:
      Calendar cal = org.joda.time.format.ISODateTimeFormat.dateTimeNoMillis().parseDateTime(s);

      Current code is ugly and doesn't handle time zones properly (hence the bug and not just improvement).

        Acceptance criteria

              Unassigned Unassigned
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD