Ignore:
Timestamp:
2024-05-06T21:11:29+02:00 (11 months ago)
Author:
taylor.smock
Message:

Fix #23658: Streetside fails to parse dates when using some locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnable.java

    r36262 r36263  
    1313import java.util.ArrayList;
    1414import java.util.List;
     15import java.util.Locale;
    1516import java.util.Objects;
    1617import java.util.concurrent.Callable;
     
    149150                final var vintageStart = LocalDate
    150151                        .parse(node.getString("vintageStart").replace("GMT", "UTC"),
    151                                 DateTimeFormatter.ofPattern("dd LLL yyyy zzz"))
     152                                DateTimeFormatter.ofPattern("dd LLL yyyy zzz", Locale.ROOT))
    152153                        .atStartOfDay().toInstant(ZoneOffset.UTC);
    153154                final var vintageEnd = LocalDate
    154155                        .parse(node.getString("vintageStart").replace("GMT", "UTC"),
    155                                 DateTimeFormatter.ofPattern("dd LLL yyyy zzz"))
     156                                DateTimeFormatter.ofPattern("dd LLL yyyy zzz", Locale.ROOT))
    156157                        .atTime(LocalTime.MAX).toInstant(ZoneOffset.UTC);
    157158                final List<String> imageUrlSubdomains = node.getJsonArray("imageUrlSubdomains")
Note: See TracChangeset for help on using the changeset viewer.