1 | try { |
2 | let body = JSON.parse($response.body); |
3 | const secondsToSubtract = 60 * 60 * 24 * 18200; // ~49.86 năm |
4 | if (body?.timestamp) { |
5 | body.timestamp = Number(body.timestamp) - secondsToSubtract; |
6 | } |
7 | $done({ body: JSON.stringify(body) }); |
8 | } catch (e) { |
9 | $done({}); |
10 | } |
now.js
· 326 B · JavaScript
Raw
try {
let body = JSON.parse($response.body);
// Lấy timestamp hiện tại theo giờ hệ thống (UTC, tính theo giây)
const now = Math.floor(Date.now() / 1000);
if (body?.timestamp) {
body.now = now;
body.timestamp = now + 3000;
}
$done({ body: JSON.stringify(body) });
} catch (e) {
$done({});
}
1 | try { |
2 | let body = JSON.parse($response.body); |
3 | |
4 | // Lấy timestamp hiện tại theo giờ hệ thống (UTC, tính theo giây) |
5 | const now = Math.floor(Date.now() / 1000); |
6 | |
7 | if (body?.timestamp) { |
8 | body.now = now; |
9 | body.timestamp = now + 3000; |
10 | } |
11 | |
12 | $done({ body: JSON.stringify(body) }); |
13 | } catch (e) { |
14 | $done({}); |
15 | } |
timezone.module
· 331 B · Text
Raw
#!name=Timezone Shift
#!homepage=https://f97.xyz
#!author=f97
#!desc=Adjust TimezoneDB timestamp by subtracting ~50 years
[Script]
TimezoneDB=type=http-response,pattern=timezonedb,requires-body=1,script-path=https://demo.opengist.io/f97/cfa7470912c74cae8834bbd590f86666/raw/HEAD/fix.js
[MITM]
hostname=%APPEND% api.timezonedb.com
1 | #!name=Timezone Shift |
2 | #!homepage=https://f97.xyz |
3 | #!author=f97 |
4 | #!desc=Adjust TimezoneDB timestamp by subtracting ~50 years |
5 | |
6 | [Script] |
7 | TimezoneDB=type=http-response,pattern=timezonedb,requires-body=1,script-path=https://demo.opengist.io/f97/cfa7470912c74cae8834bbd590f86666/raw/HEAD/fix.js |
8 | |
9 | [MITM] |
10 | hostname=%APPEND% api.timezonedb.com |