Open simonmichael opened 3 years ago
Reported on chat: a CSV date containing the time zone "Mountain Daylight Time" can't be parsed by hledger CSV rules.
https://hledger.org/hledger.html#date-format understands the date format codes provided by https://hackage.haskell.org/package/time-1.11.1.2/docs/Data-Time-Format.html#v:formatTime. One of these is %Z, which currently supports only a limited set of names, cf https://hackage.haskell.org/package/time-1.11.1.2/docs/Data-Time-Format.html#v:defaultTimeLocale:
%Z
only the ten time-zones mentioned in RFC 802 sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT". Note that the parsing functions will regardless parse "UTC", single-letter military time-zones, and +HHMM format.
We could construct a locale with a more complete set of names, cf https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, which would allow date-format to handle more real-world CSV dates.
date-format
Sorry, is this issue actual, right? Could I make somewhat in this area?
@advancedAlpaka hi, yes this is still a limitation. Have you seen it cause a problem in your usage ?
(Yes, help with this is welcome.)
Reported on chat: a CSV date containing the time zone "Mountain Daylight Time" can't be parsed by hledger CSV rules.
https://hledger.org/hledger.html#date-format understands the date format codes provided by https://hackage.haskell.org/package/time-1.11.1.2/docs/Data-Time-Format.html#v:formatTime. One of these is
%Z
, which currently supports only a limited set of names, cf https://hackage.haskell.org/package/time-1.11.1.2/docs/Data-Time-Format.html#v:defaultTimeLocale:We could construct a locale with a more complete set of names, cf https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, which would allow
date-format
to handle more real-world CSV dates.