Javascript: Get UTC Date Object by UTC Offset -


we're having lots of location-based data , 1 parameter each location/city timezone parameter, holds utc offset local timezone.

for example: vienna: 1 denver: -7

now, want local time cities.

up until using this:

var date = new date( new date().gettime() + offset * 3600 * 1000);

but today, realized hours +1 off.

how can local times utc offset in javascript?

use this:

 var d = new date()  var n = d.gettimezoneoffset(); 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -