maplibre / maplibre-navigation-ios

MapLibre Navigation SDK for iOS
Other
29 stars 27 forks source link

Fix failing test for 24 hr locales #44

Closed michaelkirk closed 1 month ago

michaelkirk commented 1 month ago

Description

This test was failing for me. I use en-US locale, but I set my clock to 24 hour. It's admittedly uncommon, but I'd wager this test is failing for anyone in a non-12 hours locale.

 let beforeSunrise = dateFormatter.date(from: "05:00 AM")! // Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value

To be honest, I expected the existing date format string hh:mm a to be sufficient, but apparently it's not.