[racket] dbd-spgsql.plt date problem

From: prad (prad at towardsfreedom.com)
Date: Sun Nov 28 18:32:50 EST 2010

some of this is speculation since i'm just a couple of days into the
racket system.

in the dbd-spgsql.plt package by bzlib we have:

(define (sql-date->date date)
  (match date
         ((struct dbd:sql-date (year month day))
          (make-date 0 0 0 0 day month day 0))))
http://planet.plt-scheme.org/package-source/bzlib/dbd-spgsql.plt/1/2/spgsql.ss

which i believe is supposed to get a sql date and return it as a normal
date which you can then get stuff out of with srfi/19 using date-year
etc.

however, i'm getting the day returned instead of the year, i assume
because the last line in the code reads "day month day" instead of
"year month day".

if i am correct, how do i request a fix?

meanwhile, can i make the change myself on my machine. i can't edit the
actual dbd-spgsql.plt file in my .racket directory because it seems to
be byte-coded(?) though i can read it in emacs. i tried downloading the
code from the web, saved as dbd-spgsql.rkt along with array.rkt which
it wants as a module and then did (require "dbd-spgsql.rkt") and now i
can get the year printing out the way i think it should be:
(tm:date 0 0 0 0 2010 9 18 0)
instead of what i was getting"
(tm:date 0 0 0 0 18 9 18 0)

so i can probably get it to work right eventually, but is there a way i
can modify the actual file i'm getting from planet?


-- 
In friendship,
prad

                                      ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's


Posted on the users mailing list.