MCPcopy Create free account
hub / github.com/aliyun/openapi-core-nodejs-sdk / timestamp

Function timestamp

lib/rpc.js:26–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26function timestamp() {
27 var date = new Date();
28 var YYYY = date.getUTCFullYear();
29 var MM = kitx.pad2(date.getUTCMonth() + 1);
30 var DD = kitx.pad2(date.getUTCDate());
31 var HH = kitx.pad2(date.getUTCHours());
32 var mm = kitx.pad2(date.getUTCMinutes());
33 var ss = kitx.pad2(date.getUTCSeconds());
34 // 删除掉毫秒部分
35 return `${YYYY}-${MM}-${DD}T${HH}:${mm}:${ss}Z`;
36}
37
38function encode(str) {
39 var result = encodeURIComponent(str);

Callers 3

requestMethod · 0.85
_buildParamsMethod · 0.85
rpc.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected