Hi,

On my Cas-Server 7.3.3, 7.3.4, I get the following logs:

2026-02-19 12:38:38,012 INFO [org.apereo.inspektr.audit.AuditTrailManager] 
- <Audit trail record BEGIN
=============================================================
WHEN: 2026-02-19T11:38:38.012664
WHO: audit:unknown
WHAT: {source=RankedMultifactorAuthenticationProviderWebflowEventResolver, 
event=success, url=https://sss.sss.sss:8445/cas/login, 
timestamp=2026-02-19T11:38:38.011}
ACTION: AUTHENTICATION_EVENT_TRIGGERED

As you can see, the times in the record are different:

- log: 2026-02-19 12:38:38,012
- WHEN: 2026-02-19T11:38:38.012664
- WHAT: .... timestamp=2026-02-19T11:38:38.011 .....

This action is executed in  2026-02-19 12:38:38,012 .  Is this okay? Or do 
I need to define a property to set my time zone correctly in WHEN / WHAT? 

Additionally, I store the audit in Oracle SQL, using the properties of CAS:

cas.audit.jdbc.*

It audits all events, but I have problems with COM_AUDIT_TRAIL.AUD_DATE. It 
is created:

AUD_DATE TIMESTAMP(6) WITH TIME ZONE

It's saved with the time zone. The event that was previously displayed in 
the log is now in the database, with value:

19/02/26 11:38:38,012664000 EUROPE/MADRID

And that's not correct either. The correct time should be: 
12:38:38,012664000 EUROPE/MADRID. The time zone in EUROPE/MADRID is now 
UTC+1.

If I execute this select:

SELECT 
   aud_date,
   aud_date AT TIME ZONE 'UTC'
FROM com_audit_trail 
where id = 47664;

I obtain:

AUD_DATE                                    AUD_DATE_UTC
19/02/26 11:38:38,012664000 EUROPE/MADRID 19/02/26 10:38:38,012664000 UTC

These dates are incorrect.

For the log and the database, the time is get in 
org.apereo.inspektr.audit.AuditTrailManagementAspec:

private void executeAuditCode(final String currentPrincipal, final String[] 
auditableResources,
                                  final ProceedingJoinPoint joinPoint, 
final Object retVal, final String action) {

        val clientInfo = clientInfoResolver.resolveFrom(joinPoint, retVal);
        val actionDate = auditActionDateProvider.get();
....
}

Does the `auditActionDateProvider.get()` command get the time in the UTC 
time zone?

org.apereo.inspektr.common.spi.AuditActionDateProvider

    static AuditActionDateProvider utc() {
        return () -> LocalDateTime.now(Clock.systemUTC());
    }

Perhaps this method?

I think that the sql command do something similar to, with UTC:

INSERT INTO AUDIT_CAS_DEMO (AUD_DATE)
VALUES (
  TO_TIMESTAMP_TZ('2026-02-19 11:38:38.012664000 Europe/Madrid', 
'YYYY-MM-DD HH24:MI:SS.FF TZR')
);

And it's saving my time zone incorrectly. It have to add an hour before 
saving.

Any help?

Best regards.

-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/66fd926b-e1b9-4d44-924f-94c4461ea0c1n%40apereo.org.

Reply via email to