You need to sign in to do that
Don't have an account?
Date Always Being Displayed in GMT
Hello,
I have created a Visualforce email alert when a new event has been created. But the event time in the subject and email body don't match.

I think it's because the time is in GMT in the email body and we are on BST in the UK now.
I have also created a custom field called
Start Date Time Text that pulls through the date as text, formula below;
TEXT( DAY( ActivityDate ) ) & "/" & TEXT( MONTH( ActivityDate ) ) & "/" & TEXT( YEAR( ActivityDate ) ) & " " & MID( TEXT(ActivityDateTime), 12,5)
This doesn't display correctly either, same issue?

Anyone know how to resolve the time zone issue? Both company and user time zones are set to BST.
Thanks,
Paul
I have created a Visualforce email alert when a new event has been created. But the event time in the subject and email body don't match.
I think it's because the time is in GMT in the email body and we are on BST in the UK now.
I have also created a custom field called
Start Date Time Text that pulls through the date as text, formula below;
TEXT( DAY( ActivityDate ) ) & "/" & TEXT( MONTH( ActivityDate ) ) & "/" & TEXT( YEAR( ActivityDate ) ) & " " & MID( TEXT(ActivityDateTime), 12,5)
This doesn't display correctly either, same issue?
Anyone know how to resolve the time zone issue? Both company and user time zones are set to BST.
Thanks,
Paul
If it is a Visualforce email, don't use a formula field to format the date but just <apex:outputText> and <apex:param>.
Date formatting example:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputText.htm
{0,date,yyyy.MM.dd G 'at' HH:mm:ss z}"> // 0 = first parameter, 1 = second parameter of type "date".
<apex:param value="{! NOW() }" {! event.ActivityDateTime} instead of {! NOW() }