Last active 1747999916

f97's Avatar f97 revised this gist 1747998192. Go to revision

1 file changed, 1 insertion, 1 deletion

now.js

@@ -5,7 +5,7 @@ try {
5 5 const now = Math.floor(Date.now() / 1000);
6 6
7 7 if (body?.timestamp) {
8 - body.timestamp = now;
8 + body.timestamp = now + 60 *2;
9 9 }
10 10
11 11 $done({ body: JSON.stringify(body) });

f97's Avatar f97 revised this gist 1747997891. Go to revision

3 files changed, 15 insertions, 1 deletion

-fix.js renamed to fix.js

File renamed without changes

now.js(file created)

@@ -0,0 +1,14 @@
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.timestamp = now;
9 + }
10 +
11 + $done({ body: JSON.stringify(body) });
12 + } catch (e) {
13 + $done({});
14 + }

timezone.module

@@ -4,7 +4,7 @@
4 4 #!desc=Adjust TimezoneDB timestamp by subtracting ~50 years
5 5
6 6 [Script]
7 - TimezoneDB=type=http-response,pattern=timezonedb,requires-body=1,script-path=https://demo.opengist.io/f97/cfa7470912c74cae8834bbd590f86666/raw/HEAD/timezonedb-fix.js
7 + TimezoneDB=type=http-response,pattern=timezonedb,requires-body=1,script-path=https://demo.opengist.io/f97/cfa7470912c74cae8834bbd590f86666/raw/HEAD/now.js
8 8
9 9 [MITM]
10 10 hostname=%APPEND% api.timezonedb.com

f97's Avatar f97 revised this gist 1747997844. Go to revision

1 file changed, 0 insertions, 0 deletions

timezonedb-fix.js renamed to -fix.js

File renamed without changes

f97's Avatar f97 revised this gist 1747997754. Go to revision

1 file changed, 10 insertions

timezone.module(file created)

@@ -0,0 +1,10 @@
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/timezonedb-fix.js
8 +
9 + [MITM]
10 + hostname=%APPEND% api.timezonedb.com

f97's Avatar f97 revised this gist 1747997655. Go to revision

1 file changed, 10 insertions

timezonedb-fix.js(file created)

@@ -0,0 +1,10 @@
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 + }
Newer Older