Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Request #8739 Make it possible to disable forcing a common date format
Submitted: 2006-09-19 21:23 UTC
From: martin at bugs dot unl dot edu dot ar Assigned: lsmith
Status: Closed Package: MDB2 (version 1.2.2)
PHP Version: 5.1.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 20 + 31 = ?

 
 [2006-09-19 21:23 UTC] martin at bugs dot unl dot edu dot ar (Martin Marques)
Description: ------------ Every time a new connection is made MDB2 executes this on line 424: if (!@pg_query($connection, "SET SESSION DATESTYLE = 'ISO'")) { This changes the way dates are returned, which is really undesirable, especially if you are useing SQL like dates (dd/mm/yyyy) and you get back ISO (yyyy/mm/dd). It would be nice if this could be configurable.

Comments

 [2006-09-19 21:28 UTC] lsmith (Lukas Smith)
This change would affect several drivers (pgsql, oci8, ibase and mssql). Not sure what a good name for the option would be. Maybe something like the following set before making the connection: $mdb2->setOption('force_date_format', false); Then again this might have to become a DSN option, to make sure that changes to this setting are automatically taken into account even for existing connections.
 [2006-09-26 15:47 UTC] lsmith (Lukas Smith)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I have added a new 'disable_iso_date' date DSN option. This means if you want to disable this conversion you need to set disable_iso_date to some value that evaluates to true inside your DSN. See the documentation on DSN's for details on how to set options inside the DSN.