I am facing a challenge.
- I am using a datetime field.
- I need the datetime to display after save without automatically changing based on user's time zone.
For example, if 7:30PM is entered, I need 7:30PM to always display regardless of user timezone.
In this example, all users should see 7:30PM regardless of their time zone.
This is critical in order for related logic and functionality to work as expected.
Does anyone have any idea how to skirt the auto time zone adjustment? I am looking for a javascript example to control the time zone on display.
Alternatively, if anyone has a suggestion for displaying a nice datetime picker and not storing the data in UTC this would be helpful in this case. I am tempted to use separate fields and a custom layout but if this can with the datetime field this would be better.
I know this is an old post, but it seems to still get views.
Please note, this is not recommended practice, and should only be used as a last resort.
edit file include/MySugar/javascript/MySugar.js add at the bottom:
This creates an Override of the default function getTimezoneOffset to always return 0 offset.
Then edit file include/TimeDate.php
find the function adjustmentForUserTimeZone for me it was line 1957
change the value for all returns to be 0
from:
to:
This changes the server end to always use the server time as the time to display.