Hotfix - Flujos de trabajo - Corrección del manejo de zonas horarias en flujos de trabajo desde actualización masiva. #539
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.
Descripción del problema
Al ejecutar un workflow que manipula fechas, se ha detectado un comportamiento inconsistente en el manejo de zonas horarias:
El problema se origina en
FormulaCalculator::getDBFormat()
cuando llama a$timedate->tzUser($date, $current_user)
. En el contexto de actualización masiva, esta función acaba utilizando GMT/UTC en lugar de la zona horaria del usuario debido a la lógica enTimeDate::_getUserTZ()
.SinergiaCRM/modules/AOW_Actions/FormulaCalculator.php
Lines 865 to 881 in bf16f81
Se ha modificado
FormulaCalculator::getDBFormat()
para manejar específicamente el caso de actualización masiva, asegurando que se utilice la zona horaria correcta del usuario en todos los contextos.Como probarlo
Nombre = ({date(d-m-Y H:i; {P0})})