Incorrect TimeZone and format on custom entryPoints #5319

Open
opened 2026-02-20 16:59:35 -05:00 by deekerman · 1 comment
Owner

Originally created by @kale1d0code on GitHub (Apr 16, 2025).

Issue

datetime fields use the incorrect format and timezone on custom entryPoints
eg

if the system timezone is UTC
and the user timezone is GMT (Europe/London)
and the field value displays within the CRM as: 16/04/2025 09:00am

$someBean->someDateTimeField

This will return: 04/16/2025 08:00

Possible Fix

I am still trying to understand the difference between how the system handles date/time/datetime fields from an entrypoint over standard views (List, Edit, Detail)

Steps to Reproduce the Issue

1. Set user timezone to Europe/London
2. Set user date format to day / month / year
3. create a custom entrypoint which will return a date field value
4. observe the value is incorrect

Context

Display a datetime in a custom entrypoint

Version

7.14.2 (will test current version soon)

What browser are you currently using?

Chrome

Browser Version

Version 134.0.6998.35 (Official Build) (64-bit)

Environment Information

PHP 8.1.27, MariaDB 10.9.4

Operating System and Version

Debian GNU/Linux 11 (bullseye)

Originally created by @kale1d0code on GitHub (Apr 16, 2025). ### Issue datetime fields use the incorrect format and timezone on custom entryPoints eg if the system timezone is UTC and the user timezone is GMT (Europe/London) and the field value displays within the CRM as: ```16/04/2025 09:00am``` ``` $someBean->someDateTimeField ``` This will return: ```04/16/2025 08:00``` ### Possible Fix I am still trying to understand the difference between how the system handles date/time/datetime fields from an entrypoint over standard views (List, Edit, Detail) ### Steps to Reproduce the Issue ```bash 1. Set user timezone to Europe/London 2. Set user date format to day / month / year 3. create a custom entrypoint which will return a date field value 4. observe the value is incorrect ``` ### Context Display a datetime in a custom entrypoint ### Version 7.14.2 (will test current version soon) ### What browser are you currently using? Chrome ### Browser Version Version 134.0.6998.35 (Official Build) (64-bit) ### Environment Information PHP 8.1.27, MariaDB 10.9.4 ### Operating System and Version Debian GNU/Linux 11 (bullseye)
Author
Owner

@johnM2401 commented on GitHub (Apr 21, 2025):

Hey!

Thank you for getting in touch!

I've given this a try on a local 7.14.6 with a basic custom entrypoint:

Image
(ie: Grab a specific Meeting's Start and End Date and display them)


However, when accessing the entry point as a user, the format and timezone seem to be respected:

(user 1:)
Image

(user 2)
Image


Have I perhaps missed or misunderstood any of your issue?

Would it be possible to provide a small snippet of your entrypoint, so I can closer replicate your issue?

Thank you again for your time and contributions!

@johnM2401 commented on GitHub (Apr 21, 2025): Hey! Thank you for getting in touch! I've given this a try on a local 7.14.6 with a basic custom entrypoint: ![Image](https://github.com/user-attachments/assets/8775aee7-d969-4581-986c-0e6792763429) (ie: Grab a specific Meeting's Start and End Date and display them) <br> However, when accessing the entry point as a user, the format and timezone seem to be respected: (user 1:) ![Image](https://github.com/user-attachments/assets/86feb498-580f-40ad-bbf5-383792c318a0) (user 2) ![Image](https://github.com/user-attachments/assets/0e18b30f-26e0-411b-9c13-d67c7e3967f9) <br> Have I perhaps missed or misunderstood any of your issue? Would it be possible to provide a small snippet of your entrypoint, so I can closer replicate your issue? Thank you again for your time and contributions!
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#5319
No description provided.