Subject | Re: [ib-support] Embedded SQL anyone? |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-04-06T02:34:24Z |
"Peter Faulks" <pfaulks@...> wrote in message
news:20020404123347.4fe53665.peter@......
Year is represented as calendar year minus 1900 and month is zero based.
C.
news:20020404123347.4fe53665.peter@......
> On Wed, 03 Apr 2002 13:15:50 -0500 Ann Harrison <aharrison@...>The correct values? Those are the correct values for tm.
> wrote:
>
> > >1) what is the deal with isc_decode_sql_date() why is the result in the
> tm
> > >struct a 2 digit year and why is the month off by 1?
> >
> > Because the tm struct is a c thingy and that's the way it's
> > defined.
>
> Here's a tm struct definition:
>
> struct tm {
> int tm_sec;
> int tm_min;
> int tm_hour;
> int tm_mday;
> int tm_mon;
> int tm_year;
> int tm_wday;
> int tm_yday;
> int tm_isdst;
> };
>
> For backward compatibility, you'd have to leave isc_decode_sql_date() as
> is, but perhaps a new function that actually returns the correct values
> might be in order?
Year is represented as calendar year minus 1900 and month is zero based.
C.