Time offset 1 hour out when accessing datetimes with datetime set in GMT when in BST #5260

Open
opened 2026-02-20 16:32:08 -05:00 by deekerman · 0 comments
Owner

Originally created by @kale1d0code on GitHub (Oct 22, 2024).

Issue

The CRM system uses UTC to store and process datetimes.
The system offsets any times it stores with an end-user timezone mostly for viewing purposes but this would happen anytime a datetime is accessed for any reason.

This causes problems when sending automated emails.
The system uses UTC when it sends emails outside of a user context which causes every single datetime used in an email template to be incorrect if the email wasn't sent due to an end-user action.

When a user views a GMT datetime when the actual date is BST, the viewed datetime would also be incorrect.

This issue affects all SuiteCRM versions I have used 7.10 -> 7.14

Possible Fix

implement a system timezone to offset datetimes during automation (outside user context)

do not mix BST and GMT

Steps to Reproduce the Issue

1. create a workflow or logic hook which extracts the time from a datetime to something like a text field for a record
2. set this datetime to a date in november on your record (GMT)
3. set your system time to a date or time within BST
4. trigger the workflow / logic hook
5. observe the incorrect time on the textfield
...

Context

sending out meeting notifications to delegates and the delegates showing up an hour early.

Version

7.14.2

What browser are you currently using?

Chrome

Browser Version

Google Chrome Version 129.0.6668.89 (Official Build) (64-bit)

Environment Information

MariaDB 10.9.4 | PHP 7.4.25

Operating System and Version

Debian GNU/Linux 10 (buster)

Originally created by @kale1d0code on GitHub (Oct 22, 2024). ### Issue The CRM system uses UTC to store and process datetimes. The system offsets any times it stores with an end-user timezone mostly for viewing purposes but this would happen anytime a datetime is accessed for any reason. This causes problems when sending automated emails. The system uses UTC when it sends emails outside of a user context which causes every single datetime used in an email template to be incorrect if the email wasn't sent due to an end-user action. When a user views a GMT datetime when the actual date is BST, the viewed datetime would also be incorrect. This issue affects all SuiteCRM versions I have used 7.10 -> 7.14 ### Possible Fix implement a system timezone to offset datetimes during automation (outside user context) do not mix BST and GMT ### Steps to Reproduce the Issue ```bash 1. create a workflow or logic hook which extracts the time from a datetime to something like a text field for a record 2. set this datetime to a date in november on your record (GMT) 3. set your system time to a date or time within BST 4. trigger the workflow / logic hook 5. observe the incorrect time on the textfield ... ``` ### Context sending out meeting notifications to delegates and the delegates showing up an hour early. ### Version 7.14.2 ### What browser are you currently using? Chrome ### Browser Version Google Chrome Version 129.0.6668.89 (Official Build) (64-bit) ### Environment Information MariaDB 10.9.4 | PHP 7.4.25 ### Operating System and Version Debian GNU/Linux 10 (buster)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5260
No description provided.