Skip to content

Commit

Permalink
change toGMTString()
Browse files Browse the repository at this point in the history
change toGMTString() => toUTCString() while deprecated
  • Loading branch information
Hüseyin Koyun committed Feb 21, 2016
1 parent 008b6d9 commit 65ce608
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 65ce608

Please sign in to comment.