Beware of time zones settings

3
Beware of the time zone settings of your user accounts. If you allow to leave them empty to unexpected results can occur during daylight saving time (DST) or summer time. When no time zone is set, Mendix uses the time zone of the user's browers, but it doesn't take DST into account. The effect is that during DST times that are outside DST boundaries are stored with a 1 hour difference. This issue only occurs when no time zone is set. Easily solved but it took me some time to figure out what was going wrong...
asked
2 answers
2

For people that are using this across multiple timezones (as in the US for example). It is really important to avoid using the timezone setting. In the Netherlands (with a +1 offset) you don't really notice any difference, but in the US with an offzet between -5 and -9 the issues are significant (if the date has a utc time of 00:00, in NL it will show the same day but uses 01:00 hours, in the US the value will be a complete day off)

The behavior if you set this property wrong is even worse. If you choose a timezone that you are not in the behavior of dates will become really difficult for a user to understand.
I specifically tell people during training Never to use the timezone relationship of a user, for the simple reason that it only affects half the data in the application (only server side). The browser will still translate dates and times according to the timezone in the browser.

In Mendix 5.5 I have researched the behavior also across DST transitions, and at that point in time the default behavior (without explicitly setting the timezone) seemed to cover all cases.
Can we please connect and discuss your specific case? I'll see if I can request your contact information somewhere, or if you read this post could you please send me an email? (jasper.van.der.hoek [at] mendix.com)

answered
0

Good point, I added this to the date time FAQ

"Note that if you do not set a timezone to a user, the server only knows the offset from UTC that the browser reports of the current moment, which can lead to unexpected results when dealing with dates in a different period of the year after a Daylight Savings Time adjustment."

answered