문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top