Fixed mdy functions to use correct offset.

This commit is contained in:
Michael Meskes 2003-07-24 08:41:07 +00:00
parent 0643b6a1ba
commit 060229b9d7
3 changed files with 7 additions and 3 deletions

View File

@ -1587,6 +1587,10 @@ Thu Jul 17 09:15:59 CEST 2003
Fri Jul 18 16:31:10 CEST 2003
- Added some more compatibility features to the parser.
Thu Jul 24 10:33:51 CEST 2003
- Fixed mdy functions to use correct offset.
- Set ecpg version to 3.0.0
- Set ecpg library to 4.0.0
- Set pgtypes library to 1.0.0

View File

@ -100,7 +100,7 @@ PGTYPESdate_julmdy(Date jd, int* mdy)
{
int y, m, d;
j2date((int) jd, &y, &m, &d);
j2date((int) (jd + date2j(2000, 1, 1)), &y, &m, &d);
mdy[0] = m;
mdy[1] = d;
mdy[2] = y;
@ -113,7 +113,7 @@ PGTYPESdate_mdyjul(int* mdy, Date *jdate)
/* day is mdy[1] */
/* year is mdy[2] */
*jdate = (Date) date2j(mdy[2], mdy[0], mdy[1]);
*jdate = (Date) (date2j(mdy[2], mdy[0], mdy[1]) - date2j(2000, 1, 1));
}
int

View File

@ -36,7 +36,7 @@ int main()
while (1)
{
$fetch in c into :i, :j;
$fetch forward c into :i, :j;
if (sqlca.sqlcode == 100) break;
else if (sqlca.sqlcode != 0) printf ("Error: %ld\n", sqlca.sqlcode);