Uploaded image for project: 'GeoServer'
  1. GeoServer
  2. GEOS-5879

KML TimeStamp date-month swap in non-POSIX locale

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.4-beta
    • Fix Version/s: 2.9.3, 2.10.1
    • Component/s: WMS
    • Labels:
      None

      Description

      Building the new kml module in a non-POSIX locale fails because day and month are swapped in KML timestamps in a POSIX locale (which is what the broken KMLTest expects).

      This passes:
      LC_ALL=C mvn -o -Dtest=KMLTest test

      Otherwise with non-US UTF-8 locale this fails:
      mvn -o -Dtest=KMLTest test

      Looks like Jenkins and Hudson helpfully set C/POSIX locale, hiding this failure.

      Failure looks like this:

      Failed tests: testTimeTemplate(org.geoserver.kml.KMLTest): expected:<2002-2T00:00:00Z>
      testTimeInvervalTemplate(org.geoserver.kml.KMLTest): expected:<2002-

      So the test is expecting "2002-02-12T00:00:00Z", but looking in Others.properties reveals 2002-12-02; the month and date are swapped!!!

      It looks like the problem is that FeatureTemplate forces US date format "MM/dd/yyyy", but PlacemarkTimeDecoratorFactory.PlacemarkTimeDecoratorFactory handles dates differently, so a date passed into a string and then re-encoded gets its day and month swapped. The result is <b>correct</b> in a non-POSIX locale, but KMLTest then fails because it expects the swapped values.

        Attachments

          Activity

            People

            • Assignee:
              aaime aaime
              Reporter:
              harrison.grundy codehaus (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: