Req #81644 [Opn]: mysql native driver should use DateTime object

From: Date: Sat, 20 Nov 2021 11:47:45 +0000
Subject: Req #81644 [Opn]: mysql native driver should use DateTime object
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237883@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81644&edit=1 ID: 81644 Updated by: heiglandreas@php.net Reported by: shop1 at mokraemer dot de Summary: mysql native driver should use DateTime object Status: Open Type: Feature/Change Request Package: MySQLi related Operating System: Linux PHP Version: 8.0.13 Block user comment: N Private report: N New Comment: As PHP - at least currently - does not have native types for Date and Time there will be no possibility to convert those into Objects. And I don't even want to tackle the topic of converting Datetime values with regards to timezones. As there is no "One size fits all" it is best to leave that up to the app. And as the native mysqli driver only converts between native types I doubt that that is a thing that we should start. If so, we would for sure need an RFC for that. Previous Comments: ------------------------------------------------------------------------ [2021-11-20 10:56:07] shop1 at mokraemer dot de Description: ------------ if you use mysqli native driver, it fetches data and puts the data in the equivalent php datastructure. This is true for float, int, ... But values for date,time and datetime are still strings. It would be great if this is converted automatical. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81644&edit=1

« previous php.bugs (#237883) next »