You need to sign in to do that
Don't have an account?
acrozier
Formatting outputText to show respective users Time Zone
Hello,
I found a previous post referencing this but cannot seem to get it to work in my org. I am already using an Extension on this page to reference users information from names in a picklist. I have tried to put two extensions, such as extensions="ProjectConfirmationEXT,timeZone" but get the following error, "Error: Unknown constructor 'timeZone.timeZone(ApexPages.StandardController controller)'"
Can someone help me figure out what I am doing wrong?
VisualForce page
<apex:page standardController="Job__c" extensions="ProjectConfirmationEXT" showHeader="false" renderAs="pdf"> <apex:dataTable style="font-family: Calibri, sans-serif;" id="EventTable" value="{!Job__c.Events}" var="e" width="100%" rowClasses="odd,even" styleClass="tableClass" cellpadding="4" border="1"> <apex:column headerValue="Date"> <apex:outputField value="{0,date,MM/dd/yyyy}"> <apex:param value="{!e.StartDateTime}" /> </apex:outputField> </apex:column> <apex:column headerValue="Start Time"> <apex:outputText value="{0,time,HH:MM}"> <apex:param value="{!e.StartDateTime}" /> </apex:outputText> </apex:column> <apex:column headerValue="End Time"> <apex:outputText value="{0,time,HH:MM}"> <apex:param value="{!e.EndDateTime}" /> </apex:outputText> </apex:column> </apex:dataTable>
timeZone EXT
public class timeZone { public String dateTimeValue { get; set; } public timeZone() { dateTimeValue = System.Now().format('MM/dd/yy HH:mm a', 'PST');//GMT } }
All Answers
OK, so I got the EXT to load, but it does not appear to work, thoughts?
New Extension code
So now I understand this will only give me the current time. How can I format the Start dateTime field off of the Events object to display with time zone awareness?