Bug 760976 - FreeTDS returns distorted datetime values when mssql.datetimeconvert=Off in php.ini
Summary: FreeTDS returns distorted datetime values when mssql.datetimeconvert=Off in p...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: freetds
Version: el5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-07 13:53 UTC by Dmitry Khokhlov
Modified: 2011-12-07 14:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-07 14:15:39 UTC
Type: ---


Attachments (Terms of Use)

Description Dmitry Khokhlov 2011-12-07 13:53:43 UTC
Description of problem:
PHP began to receive wrong datetime values from mssql_query function after upgrading of freetds package. For example 
'2011-11-29 20:00:00' from database becomes '2011-04-11 00:03:20' in PHP. Downgrading this package back to the 0.64 version resolves this problem.

Version-Release number of selected component (if applicable):
freetds-0.91-1.el5.x86_64

How reproducible:
I think it can be reproduced without any problems

Steps to Reproduce:
1. Install freetds-0.91-1.el5.x86_64
2. Add mssql.datetimeconvert=Off to php.ini
3. Select any datetime value in PHP script from SQL Server database with mssql_query
  
Actual results:
The value will be distorted.

Expected results:
The same value as Microsoft SQL Server Management Studio shows.

Additional info:
SQL Server 10.50.1600.1 on Windows Server 2008 R2 Datacenter SP1
PHP 5.2.17 on CentOS 5.7

Comment 1 Dmitry Butskoy 2011-12-07 14:15:39 UTC
Well,

Since the version of 0.84, "date format" defaults are changed for "default" and "en_US" locales in /etc/locales.conf:

was: date format = %b %d %Y %I:%M%p
now: date format = %b %e %Y %I:%M:%S:%z%p

Try to revert the change (fe. as for es_ES locale) -- it should help you.

If not, please, reopen this bug.


Note You need to log in before you can comment on or make changes to this bug.