Skip to content

Commit cb2498a

Browse files
committed
Replace deprecated date.toGMTString with date.toUTCString in Magento JS lib
1 parent 1e9377a commit cb2498a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/web/mage/adminhtml/tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ var Cookie = {
248248
if (cookieLifeTime) {
249249
var date = new Date();
250250
date.setTime(date.getTime()+(cookieLifeTime*1000));
251-
expires = '; expires='+date.toGMTString();
251+
expires = '; expires='+date.toUTCString();
252252
}
253253
var urlPath = '/' + BASE_URL.split('/').slice(3).join('/'); // Get relative path
254254
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + expires + "; path=" + urlPath;

lib/web/mage/cookies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
secure = options.secure;
7979

8080
document.cookie = name + '=' + encodeURIComponent(value) +
81-
(expires ? '; expires=' + expires.toGMTString() : '') +
81+
(expires ? '; expires=' + expires.toUTCString() : '') +
8282
(path ? '; path=' + path : '') +
8383
(domain ? '; domain=' + domain : '') +
8484
(secure ? '; secure' : '');

0 commit comments

Comments
 (0)