aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog4
-rw-r--r--src/interfaces/ecpg/pgtypeslib/datetime.c4
-rw-r--r--src/interfaces/ecpg/test/test_informix.pgc2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 2d45486a3a9..f12eaddce76 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -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
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index 9e8becbda79..26afea2c646 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -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
diff --git a/src/interfaces/ecpg/test/test_informix.pgc b/src/interfaces/ecpg/test/test_informix.pgc
index 755dab2ef24..a502ad623f9 100644
--- a/src/interfaces/ecpg/test/test_informix.pgc
+++ b/src/interfaces/ecpg/test/test_informix.pgc
@@ -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);