OFX Import Bug

Brendan Coupe brendan at coupeware.com
Thu Jan 12 17:38:25 UTC 2017


My mistake, I meant DTEND not DTSTOP.

1) Bank that is off by 1 day:

ofxlog.txt: <DTEND>20170111000000.000
kmm-statement-0.txt: enddate="2017-01-10"
KMM Ledger: Online Statement Balance - 2017.01.10

2) Bank the reports 1969.12.31

ofxlog.txt: DTEND is not included in this file
kmm-statement-0.txt: enddate="1969-12-31"
KMM Ledger: Online Statement Balance -

3) Banks that work (I checked a few):

ofxlog.txt: <DTEND>20170112120000
kmm-statement-0.txt: enddate="2017-01-12"
KMM Ledger: Online Statement Balance - 2017.01.12

It appears that Thomas my be right that this is a time zone issue. I'm in
California and the bank that works reports noon of the correct day. The
bank that is off reports midnight and if you assume that is GMT then it's
the day before in California. The bank that does not include the DTEND
value appears to assume midnight on 1970.01.01 which if assumed to be GMT
is 1969.12.31 in California.

I think it makes sense to use noon since noon GMT is the only time that i't
that same day everywhere.

Note that one bank had <DTEND>20170112050000.000[-7:MST]. MST = Mountain
Standard Time, one time zone east of California (PST which is -8). Not
surprisingly, 05 MST = 12 GMT. I thought it would be good for you to know
that sometimes they include the time zone. This bank was handled correctly
(enddate="2017-01-12") so you probably already use the time zone info if
it's included.




*----Brendan*

On Thu, Jan 12, 2017 at 2:50 AM, Thomas Baumgart <thb at net-bembel.de> wrote:

> Hi,
>
> On Wednesday 11 January 2017 21:42:18 Brendan Coupe wrote:
>
> > By convert I meant that KMM converted the end date that it receives from
> > the OFX download into the enddate the appears in my ledger and also
> appears
> > in the text file in the thb folder.
> >
> > I created the file that Thomas mentioned and was surprised there is no
> > field called <DTSTOP>. There is a field called <DTSTART>. I check a
> > different OFX file from the KMM download that works correctly and it is
> > missing the <DTSTOP> field.
> >
> > The manually downloaded OFX files do have the <DTSTOP> field.
> >
> > How does KMM come up with the enddate in the thb text file when there is
> no
> > <DTSTOP> field in the OFX file? This is probably where the bug can be
> > found???
>
> Yes. It receives a 0 from libOFX and then continues from there on.
> Somewhere
> down the line there must be a subtraction (timezone, I have no idea yet)
> that
> causes the date to be the last day of 1969. In case of a missing DTEND (not
> DTSTOP) one could search for the last date of a valid transaction or some
> such. Anyway, it seems that DTSTART and DTEND are optional even in
> responses.
>
> --
>
> Regards
>
> Thomas Baumgart
>
> GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
> -------------------------------------------------------------
> Linux - Life is too short for reboots
> -------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20170112/4bfda955/attachment.html>


More information about the KMyMoney-devel mailing list