获取时区

 

C#:

TimeZoneInfo local = TimeZoneInfo.Local;
label1.Text = local.DisplayName;

 

js:

<html>
<body>

<script>
var newDate1=new Date();
alert(newDate1.getTimezoneOffset());
</script>
</body>
</html>

posted @ 2017-01-04 00:04  xjy  阅读(166)  评论(0编辑  收藏  举报