I have a CentOS 7 machine running PHP with PHP 5.6 web interface and php56w-mssql installed. My application resides within the Laravel framework connecting to the MSSQL 2012 database.
I changed the locales.conf file so that all it has is
[default] date format = %Y-%m-%d %I:%M:%S.000
And when I run the query from tsql, I return a correctly formatted date, including zeros in milliseconds at the end. However, when I execute the request either in PHP interactive mode or with the help of wizards, I get the date format without the final milliseconds.
I have an Ubuntu machine working with the same configuration, and tsql, PHP and artisan tinker all returned a correctly formatted date to me, it's just this CentOS machine, the problem.
My freetds.conf installs tds version 7.4 for global configuration and has a host entry (which is currently configured in Laravel) that
[fancy] host = 10.0.0.12 port = 1433 database = fancy tds version = 7.4 client charset = UTF-8
source share