freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Dates are returned by freetds with the month -1
- From: Carlo Simeone <simeo AT simeosoft.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Dates are returned by freetds with the month -1
- Date: Wed, 01 Jun 2005 16:43:53 +0200
Il mer, 2005-06-01 alle 16:00, Claude Renglet ha scritto:
> thanks,
>
> I've didn't though these tests.
> Now I've did it, I'm more confused.
>
> from tsql command processor, everything perfect, dates are returned
> correctly either from getdate() or from table data.
> but from php, I've got the dates returned with the month - 1 yet, even
> with getdate()
>
Try with a newer PHP/FreeTDS version. I don't remember well when/where
this problem was corrected....
If you can't change it, try the follwing mini-patch:
On "etx/mssql/php_mssql.c" put after both the sprintf lines:
(sprintf(res_buf, "%d-%02d-%02d %02d:%02d:%02d" , dateinfo.year,
dateinfo.month, dateinfo.day,dateinfo.hour, dateinfo.minute,
dateinfo.second);
this code:
#if HAVE_FREETDS
dateinfo.month++;
#endif
and
#if HAVE_FREETDS
dateinfo.month++;
#endif
Then, rebuild PHP.
HTH
--
--
Carlo Simeone
-
[freetds] Dates are returned by freetds with the month -1,
Claude Renglet, 06/01/2005
- <Possible follow-up(s)>
-
RE: [freetds] Dates are returned by freetds with the month -1,
Lowden, James K, 06/01/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Claude Renglet, 06/01/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Carlo Simeone, 06/01/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Claude Renglet, 06/02/2005
- Re: [freetds] Dates are returned by freetds with the month -1, Claude Renglet, 06/02/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Claude Renglet, 06/02/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Carlo Simeone, 06/01/2005
-
Re: [freetds] Dates are returned by freetds with the month -1,
Claude Renglet, 06/01/2005
Archive powered by MHonArc 2.6.24.