Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void onConnection(GXConnection con) {
}

public java.util.Date serverDateTime(GXConnection con) throws SQLException {
ResultSet rslt = con.getStatement("_ServerDT_", "SELECT LOCALTIMESTAMP()", false).executeQuery();
ResultSet rslt = con.getStatement("_ServerDT_", "SELECT CAST(LOCALTIMESTAMP() AS TIMESTAMP)", false).executeQuery();

rslt.next();
Date value = rslt.getTimestamp(1);
Expand Down
6 changes: 5 additions & 1 deletion java/src/main/java/com/genexus/db/driver/GXDBMSoracle7.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.sql.*;
import java.util.Date;

import com.genexus.Application;
import com.genexus.CommonUtil;

public class GXDBMSoracle7 implements GXDBMS
Expand Down Expand Up @@ -127,7 +128,10 @@ public void onConnection(GXConnection con)

public java.util.Date serverDateTime(GXConnection con) throws SQLException
{
ResultSet rslt = con.getStatement("_ServerDT_", "SELECT SYSTIMESTAMP FROM DUAL", false).executeQuery();
String sqlSentence = "SELECT SYSTIMESTAMP FROM DUAL";
if (!Application.getClientPreferences().useTimezoneFix())
sqlSentence = "SELECT CAST(SYSTIMESTAMP AS TIMESTAMP) FROM DUAL";
ResultSet rslt = con.getStatement("_ServerDT_", sqlSentence, false).executeQuery();

rslt.next();
Date value = rslt.getTimestamp(1);
Expand Down
Loading