#12655 [Com]: date-format problem
| From: | uni at natune dot net | Date: | Sat, 11 Jan 2003 20:49:20 +0000 |
| Subject: | #12655 [Com]: date-format problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-29789@lists.php.net to get a copy of this message | ||
ID: 12655
Comment by: uni@natune.net
Reported By: thomas.winkler@jawa.at
Status: Closed
Bug Type: MSSQL related
Operating System: Win2k
PHP Version: 4.0.6
New Comment:
I figured out Smarty interferes with the option of setting
mssql.datetimeconvert to "off".
If I use a Smarty instance in my test file, datetimeconvert cycles
between on an off...and after some refreshes of the page it's
eventually on.
Perhaps Smarty changes the locale settings...I don't know...
Previous Comments:
------------------------------------------------------------------------
[2003-01-11 12:33:26] uni@natune.net
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
------------------------------------------------------------------------
[2002-12-10 05:51:55] f.vulto@re-base.com
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] 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
------------------------------------------------------------------------
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