Calculation of DST in Javascript -
i using below code calculate different countries manually not reflecting dst kindly guide me achive same st gallen time 1 hour back.
<span id="clock01"></span> <script type="text/javascript"> function calctime00(city, offset) { settimeout("1"); d5 = new date(); d = new date(); utc = d.gettime() + (d.gettimezoneoffset() * 60000); nd = new date(utc + (3600000*offset));//by smt var area=""+city+"     "+nd.tolocaletimestring().replace(/:\d{2}\s/,' '); $('#clock01').html(area); settimeout(function () { calctime00('','+2');}, 1000); } </script>
Comments
Post a Comment