find-campsite icon indicating copy to clipboard operation
find-campsite copied to clipboard

Fix dates display for recreation.gov results

Open pchaussalet opened this issue 2 years ago • 0 comments

Recreation.gov returns dates including a timezone always set to UTC (for example: 2022-01-01T00:00:00Z). When displaying the date in the results, it uses local timezones, hence possibly displaying the wrong day.

This fix ignores the timezone part of the date retrieved from recreation.gov so that the timezone is the local one both for parsing and formatting.

pchaussalet avatar Jul 08 '22 23:07 pchaussalet