Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top