Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-25 11:52:04 +0400
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-07-04 18:55:41 +0400
commit804eee87c9ca4fedb1acb217e4d00a8f48b3a4f5 (patch)
tree77a752806d803a73c5695d328a439a0efaa356fb /lib/db.php
parentdbb2457d813a51e636c491eb53570cc77293ff20 (diff)
manuall calculate unix_timestamp for oracle
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php
index 859ca02c445..10e38a6374e 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -768,6 +768,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 );