diff --git a/src/js/node/http2.ts b/src/js/node/http2.ts index dad753fe4d523c..3f75d0724844c3 100644 --- a/src/js/node/http2.ts +++ b/src/js/node/http2.ts @@ -87,8 +87,8 @@ function utcDate() { function cache() { const d = new Date(); - utcCache = DatePrototypeToUTCString.$call(d); - setTimeout(resetCache, 1000 - DatePrototypeGetMilliseconds.call(d)).unref(); + utcCache = d.toUTCString(); + setTimeout(resetCache, 1000 - d.getMilliseconds()).unref(); } function resetCache() {