planarnetwork / gtfsmerge

Merge GTFS datasets
24 stars 4 forks source link

Zero out time in GTFS date string conversions #10

Closed cedarbaum closed 9 months ago

cedarbaum commented 9 months ago

Avoid local timezone issues when converting GTFS date strings to/from JS dates by zeroing out the HH:MM:SS portion of the date in getDateFromGTFSString. This forces the date object to be created with respect to the machine's local timezone. Prior to this change, the toGTFSDate test would fail when running on a machine in EDT, since the date object for 20190604 would become 20190603 due to the time offset.

Specific changes:

linusnorton commented 9 months ago

Thanks @cedarbaum this has been released in version 2.1.1