Subtracting hours from date string
问题 I am working in node js and by using moment-timezone package I have generated a date: 2017-4-10 19:04:47 Below is the code I used to generate this date time which is for timezone Asia/shanghai: var momentTimezone = require('moment-timezone'); console.log(momentTimezone(new Date()).tz('Asia/shanghai').format('Y-M-D HH:MM:ss')); Now I want to subtract hours from this time to generate another date. I want to subtract 9940 hours. I have searched for many hours but could not find exact solution.