Closed alensiljak closed 1 year ago
Can you share the .ledgerrc config related to date? I use iso format as well in my ledger as well. ledger command usually prints output in a standard format and I am assuming your .ledgerrc is changing the behavior?
Hi! Thanks for the prompt response.
The relevant parts of .ledgerrc would be
--date-format %Y-%m-%d
--wide
I was wondering if it is reading only the configured book.ledger, which is just a collection of imports, but the fact that it is reporting the date of the oldest available transaction means that this part is ok.
So it could be wide
? However, the error message clearly reports that it found a date value but can't parse it. Interesting.
The interesting part is actually the second date in the error message:
FATAL parsing time "2000-11-01" as "2006/01/02": cannot parse "-11-01" as "/"
Where is this coming from? This is also not formatted in the selected locale (en-AU), for example.
I don't want the user config to interfere with what Paisa is trying to do. There is --args-only which seem to do what I want, I will fix this issue using that flag
You didn't really clarify where is the 2006/01/02 date coming from
Sorry, I didn't read your full message. To answer our question, golang has a unique way of parsing date. Instead of using YYYY/MM/DD, you have to say 2006/01/02. It will parse the format and will figure out what you actually want to do. So yes, the date is not from your ledger, rather it's just printing the format I have given.
Sorry, I didn't read your full message.
No worries. I figured out something along those lines after I (voiced and) posted the question, hence I deleted the original message.
Describe the bug When synchronizing the ledger, the application will crash if the ISO dates are used (YYYY-MM-DD). I understand this setting comes from the locale but I have a book with ISO dates and the date is also configured in .ledgerrc. There should be a way to tell the application not to try to be too smart and decide which dates I should use. I'm not aware of any locale that has this format as the default, unfortunately. Hence, this brief testing ends here, considering the application is really unusable in it's current state.