Dates Shifted

Doug Latornell doug-gnucash at sadahome.ca
Wed Jan 17 01:40:54 EST 2007


More digging on this has revealed another dimension of what's going on.

The transactions I import from OFX files downloaded from my bank (TD
CanadaTrust) are shifted back 1 day (i.e. deposit on 12-Jan shows in GC as
11-Jan).  This is because TD uses 01:00 EST as the time part of the post
datetime for all transactions.  So, a deposit on 12-Jan shows in the OFX
file as posted at 01:00 EST that day (even though it really happened hours
later...)  When libofx processes the file during the import the datetime is
adjusted to PST (where I am) and become 22:00 PST on the previous day.  I
didn't see this behaviour earlier because I was in CET timezone and the
adjustment there adds hrs instead of subtracting.

Very annoying, but not the fault of either GC or libofx.

emacs and ofxdump helped me confirm what was happening.  I hacked up a
python script to pre-process the OFX files I download to change the -5:EST
to -8:PST on all datetimes, and imports then work as expected.

I doubt that I'll have any luck convincing TD that they need to fix this.
They provide OFX/QFX for Money/Quicken.  Makes me wonder if those programs
ignore the timezone part of the datetime - wouldn't surprise me...

Doug

On 1/14/07, Derek Atkins <warlord at mit.edu> wrote:
>
> Please, assuming one doesn't already exist.
>
> -derek
>
> Quoting Doug Latornell <doug-gnucash at sadahome.ca>:
>
> > Thanks, Derek.  I've been digging around in a copy of my data file, and
> the
> > last OFX file I imported, and was coming to the conclusion that it was
> > something like what you describe.
> >
> > I'll be staying in the PST zone for the forseable future, and plan to
> use
> > this GC data file for a long time.  So, I'll see if I can find a way to
> > repair the date (manually, or via a script).
> >
> > Assuming I can reproduce the date-shift behaviour with a toy data file,
> > would you like me to file a bug report?
> >
> > Thanks again for your help.
> >
> > Doug
> >
> > On 1/14/07, Derek Atkins <warlord at mit.edu> wrote:
> >>
> >> The transaction "date posted" entry is set to midnight local time.
> >> I don't know why we do this as opposed to, say, noon local.  But
> >> that's what happens, so that's why the dates are shifted when you
> >> change your local timezone.
> >>
> >> -derek
> >>
> >> Quoting Doug Latornell <doug-gnucash at sadahome.ca>:
> >>
> >> > Changing the OS timezone back to CET (GMT+1) corrects the dates when
> I
> >> > restart GC.  Likewise, restarting GC after changing the OS timezone
> to
> >> PST
> >> > (GMT-8) reproduces the date shift to day-1.
> >> >
> >> > Is there a datetime constant encoded in the data file when it is
> >> created?
> >> >
> >> > Doug
> >> >
> >> > On 1/13/07, Doug Latornell <doug-gnucash at sadahome.ca> wrote:
> >> >>
> >> >> Timezone is PST, nearest city is Vancouver, BC, Canada.
> >> >>
> >> >> Date and time are showing correct for here in Vancouver.
> >> >>
> >> >> Doug
> >> >>
> >> >> On 1/13/07, Derek Atkins <warlord at mit.edu> wrote:
> >> >> >
> >> >> > What's your computer's date/timezone configuration?
> >> >> >
> >> >> > -derek
> >> >> >
> >> >> > Quoting Doug Latornell <doug-gnucash at sadahome.ca>:
> >> >> >
> >> >> > > I'm using GnuCash 2.0.2 on Mac OS X 10.4.8 (PPC) and am very
> >> impressed
> >> >> > and
> >> >> > > happy with it.  Kudos to the developers for a fine piece of
> work!
> >> >> > >
> >> >> > > I started using GC 2 or 3 months ago while I was living in
> >> >> > France.  This
> >> >> > > week I moved to the west coast of Canada.  Today I noticed that
> all
> >> of
> >> >> > my
> >> >> > > transactions have shifted 1 day back; i.e . a transaction that
> used
> >> to
> >> >> > show
> >> >> > > as 2006/12/29, now shows as 2005/12/28.  It also happened with
> >> >> > transactions
> >> >> > > I imported via OFX this morning - deposits made and posted
> >> yesterday
> >> >> > > (2007/01/12) by my bank show as 2007/01/11).
> >> >> > >
> >> >> > > My guess is that a config somewhere thinks I'm still in the
> GMT+1
> >> >> > timezone,
> >> >> > > having not picked up the news from OS X when I changed the
> system
> >> to
> >> >> > GMT-8.
> >> >> > > I've done some searching with gconftool-2 to no avail.
> >> >> > >
> >> >> > > Any suggestions?
> >> >> > >
> >> >> > > Doug
> >> >> > > _______________________________________________
> >> >> > > gnucash-user mailing list
> >> >> > > gnucash-user at gnucash.org
> >> >> > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> >> >> > > -----
> >> >> > > Please remember to CC this list on all your replies.
> >> >> > > You can do this by using Reply-To-List or Reply-All.
> >> >> > >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> >        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> >> >> >        Member, MIT Student Information Processing Board  (SIPB)
> >> >> >        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
> >> >> >        warlord at MIT.EDU                        PGP key available
> >> >> >
> >> >> >
> >> >>
> >> > _______________________________________________
> >> > gnucash-user mailing list
> >> > gnucash-user at gnucash.org
> >> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> >> > -----
> >> > Please remember to CC this list on all your replies.
> >> > You can do this by using Reply-To-List or Reply-All.
> >> >
> >>
> >>
> >>
> >> --
> >>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> >>        Member, MIT Student Information Processing Board  (SIPB)
> >>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
> >>        warlord at MIT.EDU                        PGP key available
> >>
> >>
> >
>
>
>
> --
>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>        Member, MIT Student Information Processing Board  (SIPB)
>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>        warlord at MIT.EDU                        PGP key available
>
>


More information about the gnucash-user mailing list