Hi,
since the migration from A12 2022.02-ext3 to A12 2022.06-ext1 a Form Validation-rule is showing unexpected behavior.
Old behavior: if the startPublishTime is the current time (same day, same hour, same minute as current local time), it would throw the error.
New behavior: it only throws an error, if startPublishTime is earlier than the current hour (e.g. it is now 15:19. It would would throw the error, if I put startPublishTime to 14:59).
Did anyone encounter this behavior and how do I enforce the old behavior?
Underneath you can find the rule from the updated document-model.
{
"type": "Rule",
"id": "rule_9495f",
"name": "StartPublishingTimeMustNotInThePast",
"Rule": {
"errorEntityId": "field_11084",
"errorCode": "Error rule_9495f",
"errorCondition": "[startPublishTime] < Now",
"severity": "ERROR",
"errorMessage": [
{
"locale": "en",
"text": "Start Publish Time must not be in the past."
},
{
"locale": "de",
"text": "Der Startzeitpunkt darf nicht in der Vergangenheit liegen."
}
],
"guiPatterns": {
"dynamicEnumerationRule": "false"
}
}
},
Thanks in advance,
Karin
Hi @karin-sparse-tundra,
I just modeled this rule with A12 2022.06-ext1 and I could not reproduce the error. I was somewhat confused at first because my rule wasn’t firing, but that was just because my model was based on UTC time and I am working in Germany.
I then modeled your rule using the 2022.02-ext2 installer and updated these models using the model updater so that I could use them with the 2022.06-ext1 version. I was still unable to reproduce your issue. As long as I used the UTC time, my rule worked correctly.
Here is the rule from my model after updating from 2022.02-ext2 to 2022.06-ext1:
{
"type": "Rule",
"id": "rule_9e260",
"name": "StartPublishingTimeMustNotInThePast",
"Rule": {
"errorEntityId": "field_36b51",
"errorCode": "Error rule_9e260",
"errorCondition": "[startPublishTime] < Now",
"severity": "ERROR",
"errorMessage": [
{
"locale": "en",
"text": "Start Publish Time must not be in the past."
},
{
"locale": "de",
"text": "Der Startzeitpunkt darf nicht in der Vergangenheit liegen."
}
]
}
}
I will speak to my colleagues to try and better understand this issue.
Thanks a lot for your answer!
The option to define the time zone in the model came with the A12-Update, if I am not mistaken? Could you tell me where to define it and I will take a look if this is causing the weird behavior.
Thank you 
Yes, that’s right. The Time Zone option is in Settings in the Document Model. You need to open the “Expert Mode” at the bottom.
Please note, all models in the workspace need to have the same time zone settings. You cannot have one model set to Europe/Berlin and the others to UTC.
Thank you very much for your help!
Our problem is that on the client side, we work with localized time, but on the server side with UTC-time.
Before the update, it seemed that the “Now” in the validation was based on local time, but after the update, “Now” is based on the fixed timezone from the model (which is UTC in our case).
Now we need to find a way to keep localization on the client-side without breaking the validation.