how to convert local time to utc in javascript using moment code example Example: convert moment date to utc format moment moment(timestamp).toISOString(true)