]> source.dussan.org Git - nextcloud-server.git/commitdiff
manuall calculate unix_timestamp for oracle
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 25 Jun 2013 07:52:04 +0000 (09:52 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 25 Jun 2013 07:52:04 +0000 (09:52 +0200)
lib/db.php

index a6b81aaba69afd943091274ce2fe72390eefe808..f6acf6af1b79aa38e16c9192e84c04631afdede0 100644 (file)
@@ -754,6 +754,7 @@ class OC_DB {
                }elseif( $type == 'oci'  ) {
                        $query = str_replace( '`', '"', $query );
                        $query = str_ireplace( 'NOW()', 'CURRENT_TIMESTAMP', $query );
+                       $query = str_ireplace( 'UNIX_TIMESTAMP()', '((CAST(SYS_EXTRACT_UTC(systimestamp) AS DATE))-TO_DATE(\'1970101000000\',\'YYYYMMDDHH24MiSS\'))*24*3600', $query );
                }elseif( $type == 'mssql' ) {
                        $query = preg_replace( "/\`(.*?)`/", "[$1]", $query );
                        $query = str_replace( 'NOW()', 'CURRENT_TIMESTAMP', $query );