aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-01-24 19:38:21 -0800
committerzotlabs <mike@macgirvin.com>2020-01-24 19:38:21 -0800
commit19a8dfaa5c55b674df25ae7af5c1ffcf9070e522 (patch)
tree72461b15f54d222d12a1657c5ec534c25f93a236 /include/dba/dba_pdo.php
parent293d411efb28b8f20a0208e3c52883e9fbb8cea7 (diff)
parentfa45ea1d84f27c6b4ddfdcffeed622cca354f3d9 (diff)
downloadvolse-hubzilla-19a8dfaa5c55b674df25ae7af5c1ffcf9070e522.tar.gz
volse-hubzilla-19a8dfaa5c55b674df25ae7af5c1ffcf9070e522.tar.bz2
volse-hubzilla-19a8dfaa5c55b674df25ae7af5c1ffcf9070e522.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/dba/dba_pdo.php')
-rwxr-xr-xinclude/dba/dba_pdo.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index 0279342ec..49f741601 100755
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -139,6 +139,15 @@ class dba_pdo extends dba_driver {
}
}
+ function str_to_date($str) {
+ if($this->driver_dbtype === 'pgsql') {
+ return "TO_TIMESTAMP($str, 'YYYY-MM-DD HH24:MI:SS')";
+ }
+ else {
+ return "STR_TO_DATE($str, '%Y-%m-%d %H:%i:%s')";
+ }
+ }
+
function quote_interval($txt) {
if($this->driver_dbtype === 'pgsql') {
return "'$txt'";