DateTime value can be a pain.
Date time values are always stored in the database UTC format. But how it is handled on the server and thus how the comparison is done depends on the application and user time zone.
Then it also depends if the attribute is localized or not and how it is viewed by the user.
Take a look at this learning module for some more background on this: https://gettingstarted.mendixcloud.com/link/module/374/lecture/3046/7.1-Introduction
Hope this provides you the insight you need