So I have a visualforce page displaying a query. But when it is being display on a force.com sites page. The created dates are different.
Visualforce page inside sandbox:
Visualforce page on force.com sites:
Here's the query to get the items
purchaseRequest = [select id, name, CreatedBy.Name, Selected_Request__c, Ownerid, CreatedDate
where Purchase_Request__c.CreatedDate = TODAY];
As you can see, line item PR-00000016 has a datetime 2/25/2014 8:07am for the visualforce page view inside the sandbox environment. Which is PST at time of creation. But the visualforce page that is being viewed through the force.com site public view is show a datetime 2/25/2014 4:07pm for PR-0000016.
My only conclusion is that the server that host the force.com site for me is in another country and is displaying the date in their time zone. Does anyone have any other idea?
I won't be able to use this to display for our customers if this is happening. Is there a way to set time zones for force.com sites?