Open johno1985 opened 6 years ago
Hello,
following to documentation http://audit4j.org/documentation/#layouts the layout allows you to format the audit traces in console or file, not in database
I understand to need and you can a similar problem here https://github.com/audit4j/audit4j-db/issues/9
in fact for the audit in database there is not format possible if you look at the code of AuditLogDaoImpl in Audit4j-db everything is hard coded (timestamp and element).
please take also in account that this date event is store in a TIMESTAMP column not a VARCHAR column
in the code of audit-db, you have statement.setTimestamp(2, new Timestamp(event.getTimestamp().getTime()));
we shoud use the version with three parameters to force the time zone example with time zone UTC statement.setTimestamp(2, new Timestamp(event.getTimestamp().getTime()), Calendar.getInstance(TimeZone.getTimeZone("UTC"))));
please, look at your problem again and send a feed back with your need.
Regards Franck
I am trying to store the audit timestamp with the UTC timezone included in the database. I am using the following config
But this has no effect, the timestamp is stored without the timezone
I am using audit4j-core version 2.5.0 and audit4j-db version 2.5.0