Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Moment Change Timezone Without Modifying Hours

node v10.16.3
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