You need to sign in to do that
Don't have an account?
Sure@Dream
Getting the site guest user's original timezone
Hi All,
I want to get the site guest user's original timezone.
If we use userinfo.getTimzone(), it will give us the timezone thats being stored in the site guest user record.
What are the possible ways to accomplish this??
Thanks.
I want to get the site guest user's original timezone.
If we use userinfo.getTimzone(), it will give us the timezone thats being stored in the site guest user record.
What are the possible ways to accomplish this??
Thanks.
https://bitbucket.org/pellepim/jstimezonedetect
All Answers
https://bitbucket.org/pellepim/jstimezonedetect
Thanks for the info.
I will try to use this and let you know.
Thanks.
I have uploaded the zip file from that site into a static resource, in my developer org.
and have created a sample page like below.
Could you help me with this. Its alerting 1 alone. Is there anythign wrong with calling the functions?
<apex:page >
<apex:includeScript value="{!URLFOR($Resource.TimeZone,'/grunt.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.TimeZone,'/jstz.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.TimeZone,'/jstz.min.js')}"/>
<script>
function checkTimeZone()
{
alert("1");
var x=determine();
alert("2");
var y=x.name();
alert("3");
alert(y);
}
</script>
<apex:form >
<apex:commandButton onclick="checkTimeZone();" value="click" rerender="btnID" id="btnID"/>
</apex:form>
</apex:page>
Thanks
var x=determine();
to
var x = jstz.determine();
Also, you don't really need to include all three of those scripts. You should only need to include jstz.min.js.
Thanks for your reply.
I have tried the same already. But i was not aware that, using one include statement is enough..!!
I have compared the timezonekeys from this script, with our salesforce timezone keys.
Both are different.
Wont that cause any problem??..!!
Thanks.