TimeZone Issue in local VS Test environment

0
Hello I am maintaining a holiday table in DB. Loading list of holiday dates from CSV file into the table at runtime. In the CSV sheet, i gave below dates:   Below is how it is getting stored in local DB: (1 day less) Below is how it is getting stored in Test environment (Oracle DB): The issue is, i have to throw a validation message, if the user selects a holiday date from UI. The date that user is entering from UI, am doing Trim to days and comparing against this holiday table, something like below: It works fine in local – validation is thrown when user is selecting date from UI as – 26/11/2020, but, when run in test environment, validation is not thrown. Clearly due to how the date is getting stored in DB. This is clearly timezone issue. Can someone suggest as to how to rectify this.
asked
2 answers
0

Is this attribute set to Localize (in the domain model)?  If so, I would suggest setting Localize to no.  I think this will resolve your issue.

You can read a bit more about this here:  https://docs.mendix.com/refguide/date-and-time-handling#6-to-localize-or-not-to-localize  but the best practice is if the time element of a datetime attribute is not needed for your app, set Localize to no.

answered
0

This module might be of help as wel: https://learn.mendix.com/link/module/374/lecture/3046/7.1-Introduction

answered