function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

public site input date format wrong

on my public site, the input date format uses the US format, but the public site guest user shows the time zone as GMT and locale as English/Ireland

The page is very simple and on another org, which looks identical to me, it is fine:
<apex:page standardController="Contact"  >
<apex:inputField id="Date" value="{!Contact.BirthDate}" />

any ideas?
Shiva RajendranShiva Rajendran
Hi Flikin,
I have faced the similar situation.Basically the input date format and the timezone uses the system defined for the guest user profile defined in your org. Guest users are the users view your site page without silenced salesforce paid users. You have to change that user settings to change your date and time format and locale.

Just follow the below steps to solve this :

Go to your site
Click the public Access Setting Button
Go to View Users
You will find one guest user, salesforce consider any user access the site as this particular user
Just change the timezone for this user.

Do take a look at the below link for better understanding

Verify the steps by reloading the page after logout from your salesforce session
Let me know if you need further help.

Thanks and Regards,
Shiva RV
Hi Shiva, Thanks for the response, unfortunately my timezone for the guest user is correct and I still have the problem: [cid:image001.png@01D3103F.B8CF3E10]
Shiva RajendranShiva Rajendran
Hi Flikin ,
Please share the screen shot once. i couldnt see your screenshot. Provide noth the setting applied and the site user value displayed screen shot.
Please verify once that you accessed the site url after logging out from the salesforce session.
Because if you logged in from your salesforce session,it may take your salesforce user session in site.

verify and let me know .
Thanks and Regards,
Shiva RV
Hi Shiva,
this is a link to the screenshot:
and this is the page that shows the date:
All my users have a timezone of either Ireland or BST, so I can't see where it could be picking up the US setting.

I am now even more puzzled, as it looks fine in IE and Edge, it is only Firefox and Chrome that show the US format
Tomi AstikainenTomi Astikainen
The issue is that to use the Guest User Time Zone you need to disable Translation Workbench (don't ask me why). Then it works... but you can't translate anymore... hardly a solution.
thanks Tomi, I will keep this in mind, but at this stage I can't remember which customer this was for it was a long time ago Eamon Eamon Kelly Senior Developer [cid:ce182ac8-f82c-4def-8c7f-a50a91e6b394] Phone: +353 1 6535099 Website: Drumcondra Business Centre, 120 Drumcondra Road Upper, Dublin 9 CHY: 17286 CRA: 20064006 Communities of Practice Tech Donations Training Cloud Solutions
Steve Jones 44Steve Jones 44
The problem still exists. Tomi's workaround solves the problem - but agree it is hardly a solution if it means you can't translate any more (fortunately for me, the community I am building is for use only in Australia). It seems that we still have developers who struggle with the concept of dd/mm/yyyy versus mm/dd/yyyy.