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
Post a Comment