egh / ledger-autosync

Synchronize your ledger-cli files with your bank.
GNU General Public License v3.0
273 stars 42 forks source link

Add argument to set timezone offset #40

Open 501st-alpha1 opened 7 years ago

501st-alpha1 commented 7 years ago

I have noticed for a while that the transaction dates produced by ledger-autosync are occasionally off by one as compared to what is shown online or in my bank statements.

At the top of an OFX file I downloaded at 10:30 this morning, I found this:

<DTSERVER>20170905173000.000

Since I am currently in the PDT zone, I believe this means that the downloaded transaction files are always given in UTC (at least for this bank).

Unfortunately I don't see any reference to time zone in the file itself, so the only way to get the offset is to compare DTSERVER with the local date.

Could ledger-autosync add an argument to specify the time offset from DTSERVER, and adjust output times accordingly?