I probably saw this question 100 times, but still don't understand. So basically I want to display only the Time from a datetime field but not the Date. However I always get the GMT time. I know I could create a wrapper and format my datetimes in the controller. But why should I create a wrapper class only to display datetimes. I made some tests and here is what I got :
//not good, display GMT time
<apex:outputText value="{0,date,HH:mm}">
<apex:param value="{!item.Inspection_Date_Time__c}" name="p1" />
</apex:outputText>
//not good, display GMT time
<apex:outputText value="{0,number,00}:{1,number,00}">
<apex:param value="{!item.Inspection_Date_Time__c.time.hours}" name="p1" />
<apex:param value="{!item.Inspection_Date_Time__c.time.minutes}" name="p2" />
</apex:outputText>
//time is correct but I want only the time not the date
<apex:outputText value="* {!item.Inspection_Date_Time__c}" />
//display GMT time, and what's the difference with the previous line ?
<apex:outputText value="{!item.Inspection_Date_Time__c}" />
//time is correct but I want only the time not the date
<apex:outputField value="{!item.Inspection_Date_Time__c}" />
Anyone found a solution for that(except via the controller)?
Cheers,
David