Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10627 - Workflow dates are processed in UTC+0 instead of the user's timezone #10628

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

@SinergiaCRM SinergiaCRM commented Jan 27, 2025

Description

This pull request fixes an issue in SuiteCRM workflows where date fields are always processed and displayed in UTC+0, regardless of the user's configured timezone. This fix ensures that dates are processed and displayed according to the user's timezone settings, aligning workflow behavior with user expectations.

Motivation and Context

Users working in timezones other than UTC+0 experience issues with date formatting and calculations in workflows. For example, when using calculated fields in workflows, the system does not respect the user's timezone

How To Test This

  1. Edit the current user's profile to set a timezone other than UTC+0 (e.g., Europe/Madrid).
  2. Create a workflow on the Tasks module with the following parameters: Run: "Only on Save", Run on: "All Records"
  3. Add an action to the workflow:
    1. Action: "Calculated fields"
    2. Parameters: "Subject (P0)" and "Start Date (P1)"
    3. Formula:
{P0}: {P1} (Year: {date(Y;{P1})}, Month: {date(m;{P1})}, Day: {date(d;{P1})}, Hour: {date(H;{P1})}, Minutes: {date(i;{P1})}, Seconds: {date(s;{P1})})
  1. Save a new Task with a "Start Date" and verify the following:
    1. The date displayed in the "Subject" field reflects the user's configured timezone.
    2. The calculated fields respect the user's timezone during processing.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow dates are processed in UTC+0 instead of the user's timezone
1 participant