Skip to content

Commit

Permalink
FINERACT-1835: Backported fix of `Wrong audit time is set for datatab…
Browse files Browse the repository at this point in the history
…les`
  • Loading branch information
adamsaghy authored and vidakovic committed Dec 15, 2022
1 parent 2a6f479 commit 7d2121d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public String currentTenantDate() {

public String currentTenantDateTime() {
if (databaseTypeResolver.isMySQL()) {
return format("TIMESTAMP('%s')", DateUtils.getLocalDateTimeOfTenant().format(DateUtils.DEFAULT_DATETIME_FORMATER));
return format("TIMESTAMP('%s')", DateUtils.getLocalDateTimeOfSystem().format(DateUtils.DEFAULT_DATETIME_FORMATER));
} else if (databaseTypeResolver.isPostgreSQL()) {
return format("TIMESTAMP '%s'", DateUtils.getLocalDateTimeOfTenant().format(DateUtils.DEFAULT_DATETIME_FORMATER));
return format("TIMESTAMP '%s'", DateUtils.getLocalDateTimeOfSystem().format(DateUtils.DEFAULT_DATETIME_FORMATER));
} else {
throw new IllegalStateException("Database type is not supported for current date time" + databaseTypeResolver.databaseType());
}
Expand Down

0 comments on commit 7d2121d

Please sign in to comment.