Skip to content

Commit

Permalink
Merge pull request #278 from hypertext/patch-1
Browse files Browse the repository at this point in the history
change toGMTString()
  • Loading branch information
brettz9 committed Feb 22, 2016
2 parents 008b6d9 + 65ce608 commit 2d3ec11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/network/setrawcookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function setrawcookie(name, value, expires, path, domain, secure) {
}

if (expires instanceof Date) {
expires = expires.toGMTString();
expires = expires.toUTCString();
} else if (typeof expires === 'number') {
expires = (new Date(expires * 1e3))
.toGMTString();
.toUTCString();
}

var r = [name + '=' + value],
Expand All @@ -36,4 +36,4 @@ function setrawcookie(name, value, expires, path, domain, secure) {
}

return secure && r.push('secure'), this.window.document.cookie = r.join(';'), true;
}
}

0 comments on commit 2d3ec11

Please sign in to comment.