import date trouble

Ralf Habacker ralf.habacker at freenet.de
Wed Jan 16 13:15:26 GMT 2019


Am 15.01.19 um 22:30 schrieb Thomas Baumgart:
> The OFX specification is pretty clear at this point.
> 
> Elements specified as type date or datetime and generally starting with the letters “DT” accept a fully formatted date-time-timezone string. For example, “19961005132200.124[-5:EST]” represents October 5, 1996, at 1:22 and 124 milliseconds p.m., in Eastern Standard Time. This is the same as 6:22 p.m. Greenwich Mean Time (GMT). Date and datetime also accept values with fields omitted from the right. They assume the following defaults if a field is missing:
> 
> YYYYMMDD						12:00 AM (the start of the day), GMT
> YYYYMMDDHHMMSS				GMT
> YYYYMMDDHHMMSS.XXX		GMT
> 
> Your bank provides "<DTPOSTED>20181201000000" which represents midnight in GMT and since you are 5 hrs behing (EST) your local time for this is 2018-11-30 19:00:00. Since KMyMoney only uses the date, that is what you see.

According to http://www.ofx.net/downloads/OFX%202.2.pdf does the server
generating this statement seems to not follow the specs.

"3.2.8.4 Time Zone Issues
...
Although most transactions are not sensitive to the exact time, they
often are sensitive to the date. In some cases, time zone errors lead to
actions occurring on a different date than intended by the customer.
For this  reason, servers should always use a complete local time plus
GMT offset in any datetime values in a response."
Ralf




More information about the KMyMoney mailing list