Moment Change Timezone Without Modifying Hours

node v10.14.1
version: 1.0.0
endpointsharetweet
const moment = require("moment-timezone"); const a = moment("2018-12-01T12:00-08:00"); a.format()
a.toDate()
// `true` means change the timezone without modifying the hours const b = moment(a).tz("America/New_York", true); b.format()
b.toDate()
Loading…

no comments

    sign in to comment