Time zone issues

Benoit Grégoire <[email protected]>
Newsgroups gmane.comp.finance.libofx.devel
Message-ID <[email protected]>
In reference to bug 
http://sourceforge.net/tracker/index.php?func=detail&aid=778615&group_id=61170&atid=496353

> Local time is NZDT : GMT +12
>When I import an OFX file the date imported is 1 day higher than the
>date in the OX file.
>
>For example:
><DTPOSTED>20030721
>This shows up in GnuCash as 21/ 7/2003
>It should be: 20/ 7/2003
>
From the feedback from GnuCash I read:
>==>
>To solve this problem (since usually a time error is relatively
>unimportant, but date error is), I decided to use the following
>behavior:
>-If no specific time is given in the file (date only), the
>transaction is assumed to have occurred 12h00 (noon) GMT. This
>way,
>we will never
>change the date, since in any event we didn't know when in the day
>the
>transaction occurred in the first place.
>==>
>
>As NZ day time is GMT + 12 it immediately follows that NZ date will be
>changed to next day.
>I suggest to change specs to:
>-If no specific time is given in the file (date only), the
>transaction is assumed to have occurred 11:59 GMT.
>
>This spec will work in NZ as well. 


Date: 2003-07-27 18:12
Sender: benoitg
Logged In: YES 
user_id=597400

This will not work for everyone, as there are cities located
from -11 to +14.  (A timezone is defined for -12, but I
couldn't find any place that uses it).

So it seems that the only solution is to change the
conversion policy FROM:
   -If no specific time is given in the file (date only),
the transaction is assumed to have occurred 12h00 (noon)
GMT.  This way, we will never change the date, since in any
event we didn't know when in the day the transaction
occurred in the first place. We assume that if the
transaction was timezone sensitive, a proper time, with
timezone would have been specified.
  -If no timezone is specified, but exact time is, the
timezone is assumed to be GMT, following the spec.
  -If a timezone is specified, it is used to properly
convert in local time.

TO:
  -Considering that most banks seem to be sendind dates in
this format represented as local time (not compliant with
the specs), if no specific time is given in the file (date
only), the transaction is assumed to have occurred 11h59
(just befor noon) LOCAL TIME.  This way, we should never
change the date, since you'd have to travel in a timezone at
least 11 hours backwards or 13 hours forward from your own
to introduce mistakes.  However, if you are in timezone +13
or +14, and your bank meant the deta to be interpreted by
the spec, you will get the wrong date.  We hope that banks
in those timezone will either represent in local time like
most, or specify the timezone properly.
  -If no timezone is specified, but exact time is, the
timezone is assumed to be GMT, following the spec.
  -If a timezone is specified, it is used to properly
convert in local time.

What do you think?


-- 
Benoit Grégoire
http://step.polymtl.ca/~bock/



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.