Skip to content

Commit 060229b

Browse files
author
Michael Meskes
committed
Fixed mdy functions to use correct offset.
1 parent 0643b6a commit 060229b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,10 @@ Thu Jul 17 09:15:59 CEST 2003
15871587
Fri Jul 18 16:31:10 CEST 2003
15881588

15891589
- Added some more compatibility features to the parser.
1590+
1591+
Thu Jul 24 10:33:51 CEST 2003
1592+
1593+
- Fixed mdy functions to use correct offset.
15901594
- Set ecpg version to 3.0.0
15911595
- Set ecpg library to 4.0.0
15921596
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/pgtypeslib/datetime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ PGTYPESdate_julmdy(Date jd, int* mdy)
100100
{
101101
int y, m, d;
102102

103-
j2date((int) jd, &y, &m, &d);
103+
j2date((int) (jd + date2j(2000, 1, 1)), &y, &m, &d);
104104
mdy[0] = m;
105105
mdy[1] = d;
106106
mdy[2] = y;
@@ -113,7 +113,7 @@ PGTYPESdate_mdyjul(int* mdy, Date *jdate)
113113
/* day is mdy[1] */
114114
/* year is mdy[2] */
115115

116-
*jdate = (Date) date2j(mdy[2], mdy[0], mdy[1]);
116+
*jdate = (Date) (date2j(mdy[2], mdy[0], mdy[1]) - date2j(2000, 1, 1));
117117
}
118118

119119
int

src/interfaces/ecpg/test/test_informix.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main()
3636

3737
while (1)
3838
{
39-
$fetch in c into :i, :j;
39+
$fetch forward c into :i, :j;
4040
if (sqlca.sqlcode == 100) break;
4141
else if (sqlca.sqlcode != 0) printf ("Error: %ld\n", sqlca.sqlcode);
4242

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy