Skip to content

Commit

Permalink
[bugfix] Fix #4390: use offset properly in toISOString (#4391)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashsearle authored and marwahaha committed Mar 2, 2018
1 parent 1e96d87 commit b8bc835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/moment/format.js
Expand Up @@ -23,7 +23,7 @@ export function toISOString(keepOffset) {
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this._d.valueOf()).toISOString().replace('Z', formatMoment(m, 'Z'));
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
Expand Down

0 comments on commit b8bc835

Please sign in to comment.