1

I have a CSV with rows like this:

1724760000,"American Express","Payment",1234.56

When I run hledger import data/tmp.csv -f data/current.ledger --rules-file data/checking.csv.rules with date-format set to %s (number of whole seconds since the Unix epoch), the journal entries have dates that are all 1970-01-01, but they should be 2024-08-27. Am I missing something here, or is this a bug?

The entire rules file:

fields date, payee, description, amount
date-format %s
currency $
account1 Checking
Simon Michael
  • 366
  • 1
  • 10
mossymaker
  • 13
  • 4

1 Answers1

2

hledger is trying to read a date, but the time library hledger is using will not parse a date from %s (only a time, rightly or wrongly: UTCTime or ZonedTime types).

Perhaps it can be made to work with some more dev work. Interesting real world example, I wouldn't have expected this from a bank either..

Simon Michael
  • 366
  • 1
  • 10