+ Start a Discussion

Using outputText to display a time in local timezone - checklist?

Hi folks,


I am knocking my head against the wall, trying to get a an outputText field on a visualforce page to describe local time zone, and can't figure out what I'm missing.  There are many helpful emails on the forum but none that give us a checklist.  So, facing this challenge myself, here's what I've done - and maybe you can add what I've missed, so everybody has an easy place to find the answer (and so I figure this out):


  1. Set the site guest user's timezone to the local time zone.  Setup / Develop / Sites / click on the site name / Public Access Settings / View Uers / Edit and then under Time Zone pick the correct time zone.
  2. Format the field as follows
    <apex:outputText value="{0,date,MM'/'dd'/'yyyy, HH:mm:ss z}">
                    <apex:param value="{!Opportunity.Fill_Date_Time__c}"/>

    You can modify the format by modifying the string for the value.


    Have I missed a step?