ID:               12655
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         MSSQL related
 Operating System: Win2k
 PHP Version:      4.0.6
 New Comment:

My problem even goes further:

Regardless whether I use a smalldatetime column or a datetime column,
the option "mssql.datetimeconvert = Off" doesn't work correctly.
As a matter of fact, first it worked. But when I refresh my page, the
output of the datetime is as if datetimeconvert were set to "On".
Now, after some "refreshing" it keeps showing me the converted datetime
(so for the moment being, the setting seems to be ON, although I turned
it off hours ago and even restarted the Server).

My Configuration: PHP 4.2.3, Win XP Prof. SP1, MS SQL Server 2000,
Apache 2.0.43


Previous Comments:
------------------------------------------------------------------------

[2002-12-10 05:51:55] [EMAIL PROTECTED]

Reproduced with version 4CVS-2002-12-10 (dev).  Took
liberty to report this as a new bug, as this one (12655)looks closed:

   http://bugs.php.net/20920
   mssql.datetimeconvert=0 doesn't work for smalldatetime

See also:

   http://bugs.php.net/20911
   Trailing null character after mssql datetime field

------------------------------------------------------------------------

[2002-12-08 17:06:42] [EMAIL PROTECTED]

i've found the problem. The fix only fixed the problem for the normal
datetime columntype. You'll need to do the same trick for smalldatetime
columntype.

It's very easy to reproduce. 
1. create a table with 2 columns. set the first column to be datetime,
and the second to be smalldatetime. 
2. set the mssql.datetimeconvert to 0. 
3. Insert a value. 
4. do a select * from the table

you'll notice that column1 has different formatting then colum2.

i've tested this with php 4.2.3 and php 4.3.0-RC2. both have the 'bug'.

------------------------------------------------------------------------

[2002-12-08 16:52:49] [EMAIL PROTECTED]

i'm using php 4.2.3 and i'm still having this problem ;(
where can i get php 4.2.0 so i can test if that version works ?

------------------------------------------------------------------------

[2002-04-23 14:12:43] [EMAIL PROTECTED]

I wrote a patch wich has been commitef by fmk, it is php4.2

one of the latest version of php_mssql.c php_mssql.h have a patch for
this problem, because the function dbconvert() of the MSSQL-Client-Api
wich is used for converting the datetime-values does wired things.

There is a new option in the php.ini called mssql.datetimeconvert if
set
to Off then the datetime values are returned in the format YYYY-MM-DD
HH:MM:SS.

This patch is also in php4.2

------------------------------------------------------------------------

[2002-04-22 17:44:18] [EMAIL PROTECTED]

Reopen if you have the same problem with 4.2.0 (released today)


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/12655

-- 
Edit this bug report at http://bugs.php.net/?id=12655&edit=1

Reply via email to