Skip to content

Commit acf06dd

Browse files
committed
Fix
1 parent 5cdb916 commit acf06dd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/NHibernate/Dialect/Oracle9iDialect.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,7 @@ public class Oracle9iDialect : Oracle8iDialect
1010
public override string CurrentTimestampSelectString =>
1111
$"select {CurrentTimestampSQLFunctionName} from dual";
1212

13-
public override string CurrentTimestampSQLFunctionName
14-
{
15-
get
16-
{
17-
// the standard SQL function name is current_timestamp...
18-
return "current_timestamp";
19-
}
20-
}
13+
public override string CurrentTimestampSQLFunctionName => "localtimestamp";
2114

2215
// Current_timestamp is a timestamp with time zone, so it can always be converted back to UTC.
2316
/// <inheritdoc />
@@ -44,6 +37,9 @@ protected override void RegisterFunctions()
4437
{
4538
base.RegisterFunctions();
4639

40+
RegisterFunction(
41+
"current_timestamp",
42+
new NoArgSQLFunction("localtimestamp", NHibernateUtil.LocalDateTime, false));
4743
RegisterFunction(
4844
"current_utctimestamp",
4945
new SQLFunctionTemplate(NHibernateUtil.UtcDateTime, "SYS_EXTRACT_UTC(current_timestamp)"));

0 commit comments

Comments
 (0)