FINERACT-1828: Fix datatable audit time handling
This commit is contained in:
+2
-2
@@ -110,9 +110,9 @@ public class DatabaseSpecificSQLGenerator {
|
|||||||
|
|
||||||
public String currentTenantDateTime() {
|
public String currentTenantDateTime() {
|
||||||
if (databaseTypeResolver.isMySQL()) {
|
if (databaseTypeResolver.isMySQL()) {
|
||||||
return format("TIMESTAMP('%s')", DateUtils.getLocalDateTimeOfTenant().format(DateUtils.DEFAULT_DATETIME_FORMATTER));
|
return format("TIMESTAMP('%s')", DateUtils.getLocalDateTimeOfSystem().format(DateUtils.DEFAULT_DATETIME_FORMATTER));
|
||||||
} else if (databaseTypeResolver.isPostgreSQL()) {
|
} else if (databaseTypeResolver.isPostgreSQL()) {
|
||||||
return format("TIMESTAMP '%s'", DateUtils.getLocalDateTimeOfTenant().format(DateUtils.DEFAULT_DATETIME_FORMATTER));
|
return format("TIMESTAMP '%s'", DateUtils.getLocalDateTimeOfSystem().format(DateUtils.DEFAULT_DATETIME_FORMATTER));
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Database type is not supported for current date time" + databaseTypeResolver.databaseType());
|
throw new IllegalStateException("Database type is not supported for current date time" + databaseTypeResolver.databaseType());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user