MCPcopy Create free account
hub / github.com/XIU2/UserScript / getUTC8

Function getUTC8

Zhihu-Enhanced.user.js:1559–1561  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

1557
1558// UTC 标准时转 UTC+8 北京时间,修改自:https://greasyfork.org/zh-CN/scripts/402808(精简)
1559function getUTC8(t) {
1560 return (t.getFullYear() + '-' + (((t.getMonth() + 1) < 10) ? ('0' + (t.getMonth() + 1)) : (t.getMonth() + 1)) + '-' + ((t.getDate() < 10) ? ('0' + t.getDate()) : t.getDate()) + '\xa0\xa0' + ((t.getHours() < 10) ? ('0' + t.getHours()) : t.getHours()) + ':' + ((t.getMinutes() < 10) ? ('0' + t.getMinutes()) : t.getMinutes()) + ':' + ((t.getSeconds() < 10) ? ('0' + t.getSeconds()) : t.getSeconds()));
1561}
1562
1563
1564// 默认高清原图(无水印)

Callers 1

question_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected