#12655 [Com]: date-format problem
| From: | f dot vulto at re-base dot com | Date: | Tue, 10 Dec 2002 11:51:55 +0000 |
| Subject: | #12655 [Com]: date-format problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27251@lists.php.net to get a copy of this message | ||
ID: 12655
Comment by: f.vulto@re-base.com
Reported By: thomas.winkler@jawa.at
Status: Closed
Bug Type: MSSQL related
Operating System: Win2k
PHP Version: 4.0.6
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2002-12-08 17:06:42] xoror@infuse.org
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] xoror@infuse.org
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] mbretter@inode.at
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] sniper@php.net
Reopen if you have the same problem with 4.2.0 (released today)
------------------------------------------------------------------------
[2002-04-22 15:02:18] steved@mad.scientist.com
I created a patch and submitted to php-dev group. Didn't get much
reponse so I started looking at CVS and found that a change was checked
in 6 months ago for this problem, but wasn't put in to the 4.1.0 to
4.1.2 code bases. The fix should be in 4.2.
Steve Dillon
------------------------------------------------------------------------
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