Use named timezones. Include Moment Timezone
moment(birthday).tz('America/Toronto').format('YYYY-MM-DD HH:mm')
or use .utcOffset(). This function uses the real offset from UTC.
moment(birthday).utcOffset(60).format('YYYY-MM-DD HH:mm')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.