Quantcast
Channel: Getting the client's time zone (and offset) in JavaScript - Stack Overflow
Viewing all articles
Browse latest Browse all 34

Answer by Kumal Pereira for Getting the client's time zone (and offset) in JavaScript

$
0
0

Use this to convert OffSet to postive:

var offset = new Date().getTimezoneOffset();console.log(offset);this.timeOffSet = offset + (-2*offset);console.log(this.timeOffSet);

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>