Do not set time zone on SUDO context clone when creating a log line#78
Open
dahfjkg wants to merge 2 commits into
Open
Do not set time zone on SUDO context clone when creating a log line#78dahfjkg wants to merge 2 commits into
dahfjkg wants to merge 2 commits into
Conversation
passalaqua
reviewed
Jun 16, 2026
| + auditableObject.getId().toLong() + "), state: " + auditableObject.getState() + "/" + logType); | ||
|
|
||
| final IContext sudoContext = context.createSudoClone(); | ||
| sudoContext.getSession().setTimeZone(getTimeZone(context)); |
Contributor
There was a problem hiding this comment.
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.)
Contributor
Author
There was a problem hiding this comment.
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
requested changes
Jun 16, 2026
pijuskri
left a comment
Contributor
There was a problem hiding this comment.
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.
3233b45 to
c59144c
Compare
…the implementation
pijuskri
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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