From d9cacdc86d4d8bb2ca1616be65d93bc4feeef1b8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 14 Apr 2019 01:47:46 +0900 Subject: [PATCH] Update meid.ts --- src/misc/id/meid.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/misc/id/meid.ts b/src/misc/id/meid.ts index 0a0935e536..d4dc73b4f1 100644 --- a/src/misc/id/meid.ts +++ b/src/misc/id/meid.ts @@ -6,13 +6,15 @@ function getTime(time: number) { return CHARS[0]; } - return time.toString(16).padStart(16, CHARS[0]); + time += 0x800000000000; + + return time.toString(16).padStart(12, CHARS[0]); } function getRandom() { let str = ''; - for (let i = 0; i < 7; i++) { + for (let i = 0; i < 12; i++) { str += CHARS[Math.floor(Math.random() * CHARS.length)]; }