Question

I wants to find user machine timezone. But i do not want only offset but i wanted function in javascript that give me timezone string. e.g. "Asia/Kolkata" in these format.

Please help

Thanks Kalpesh

Was it helpful?

Solution

Look at this site pageloom it is helpful

download jstz.min.js and add a function to your html page

<script language="javascript">
    function getTimezoneName() {
        timezone = jstz.determine_timezone()
        alert(timezone.name());
    }
</script>

and call this function from your display tag

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top