mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #3839 from owncloud/unix_timestamp_replacement_for_oracle
manually calculate unix_timestamp for oracle
This commit is contained in:
commit
df9e56efd0
1 changed files with 1 additions and 0 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue