I have a Pacific time, e.g. 2016-09-09 01:57:42
. To convert it to UTC time I used
d = new Date('2016-09-09T01:57:42-0700')
But the problem is for PDT I have to use -0800
. So how can the Pacific time (may be -0700
or -0800
) be smartly converted to UTC time?