summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-28 06:11:28 -0700
committerBart Visscher <bartv@thisnet.nl>2013-06-28 06:11:28 -0700
commitdf9e56efd0652665a653a0f83ec3628f4e14f579 (patch)
tree31ab28a26c3d1721f8418ef28ead5129f58a9b13 /lib
parent6127fee5aa012e58c124b00f159afd3d3d95d8ce (diff)
parent7273b43cd5b0047207763ca48abc46e5d0fcb130 (diff)
downloadnextcloud-server-df9e56efd0652665a653a0f83ec3628f4e14f579.tar.gz
nextcloud-server-df9e56efd0652665a653a0f83ec3628f4e14f579.zip
Merge pull request #3839 from owncloud/unix_timestamp_replacement_for_oracle
manually calculate unix_timestamp for oracle
Diffstat (limited to 'lib')
-rw-r--r--lib/db.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php
index a6b81aaba69..f6acf6af1b7 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -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 );