试图将日期字符串转换为 HST 时间,但它不起作用。
相关代码:
var MINUTES_IN_MILLI = 60000,
HOURS_IN_MILLI = 3600000,
UTC2HST_OFFSET = 10,
date1 = new Date('2013-05-31T00:00:00Z'),
utc1 = date1.getTime() + (date1.getTimezoneOffset() * MINUTES_IN_MILLI),
hstDate1 = utc1 - (HOURS_IN_MILLI * UTC2HST_OFFSET);