// CLC TimezoneDB Mock // Giữ schema y như TimezoneDB, nhưng timestamp mock lại try { const YEARS_TO_SUBTRACT = 60 * 60 * 24 * 18200; // ~49.86 năm const TWO_HOURS = 7200; // 2 giờ const nowSec = Math.floor(Date.now() / 1000); // Đếm số lần gọi let callCount = parseInt($persistentStore.read("v3") || "0", 10) + 1; $persistentStore.write(String(callCount), "v3"); // Tạo timestamp giả const fakeTimestamp = nowSec - YEARS_TO_SUBTRACT + (callCount * TWO_HOURS); // Build body theo schema TimezoneDB (mock cơ bản, bạn có thể hardcode thêm) const body = { status: "OK", message: "", countryCode: "VN", zoneName: "Asia/Ho_Chi_Minh", abbreviation: "ICT", gmtOffset: 25200, // +7h dst: "0", zoneStart: fakeTimestamp - 86400, // giả: hôm trước zoneEnd: fakeTimestamp + 86400, // giả: hôm sau nextAbbreviation: "ICT", timestamp: fakeTimestamp, formatted: new Date(fakeTimestamp * 1000).toISOString().replace("T", " ").split(".")[0] }; $done({ response: { status: 200, headers: { "Content-Type": "application/json; charset=utf-8", "Cache-Control": "no-store" }, body: JSON.stringify(body) } }); } catch (e) { $done({}); }