Skip to content

Do not set time zone on SUDO context clone when creating a log line#78

Open
dahfjkg wants to merge 2 commits into
masterfrom
dat/deprecations-11.12
Open

Do not set time zone on SUDO context clone when creating a log line#78
dahfjkg wants to merge 2 commits into
masterfrom
dat/deprecations-11.12

Conversation

@dahfjkg

@dahfjkg dahfjkg commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Instead of passing session time zone inside the sudo clone of the context in a somewhat hackish way, we now calculate it it using the getSessionTimeZone() method

Comment thread marketplace/release-notes/10.2.2.txt Outdated
+ auditableObject.getId().toLong() + "), state: " + auditableObject.getState() + "/" + logType);

final IContext sudoContext = context.createSudoClone();
sudoContext.getSession().setTimeZone(getTimeZone(context));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be safely removed without reintroducing the issue in DAT-2186?

(A longer commit message would clarify this both in this PR and for future reference.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a description. Basically, the calculation of the time zone still happens the same way as before, but now it is not passed inside the sudocontext

@pijuskri pijuskri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session.setTimeZone is also used in com.mendix.audittrail.tests.TestTimezone. It should be removed also as the module tests will fail to compile when 12 is released and we start upgrading markerplace tests to it.

@dahfjkg dahfjkg force-pushed the dat/deprecations-11.12 branch from 3233b45 to c59144c Compare June 16, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants