Delete index.html
Browse files- index.html +0 -99
index.html
DELETED
|
@@ -1,99 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
<!DOCTYPE html>
|
| 3 |
-
<html>
|
| 4 |
-
<head>
|
| 5 |
-
<meta charset="UTF-8">
|
| 6 |
-
<title>Forex Market Hours</title>
|
| 7 |
-
<style>
|
| 8 |
-
body {
|
| 9 |
-
background-color: #0f0f0f;
|
| 10 |
-
color: white;
|
| 11 |
-
font-family: sans-serif;
|
| 12 |
-
max-width: 415px;
|
| 13 |
-
margin: 0 auto;
|
| 14 |
-
padding: 20px;
|
| 15 |
-
}
|
| 16 |
-
h2 {
|
| 17 |
-
text-align: center;
|
| 18 |
-
color: #00ccff;
|
| 19 |
-
}
|
| 20 |
-
table {
|
| 21 |
-
width: 100%;
|
| 22 |
-
border-collapse: collapse;
|
| 23 |
-
margin-top: 10px;
|
| 24 |
-
}
|
| 25 |
-
th, td {
|
| 26 |
-
border: 1px solid #333;
|
| 27 |
-
padding: 8px;
|
| 28 |
-
text-align: center;
|
| 29 |
-
}
|
| 30 |
-
th {
|
| 31 |
-
background-color: #222;
|
| 32 |
-
}
|
| 33 |
-
tr:nth-child(even) {
|
| 34 |
-
background-color: #1a1a1a;
|
| 35 |
-
}
|
| 36 |
-
</style>
|
| 37 |
-
</head>
|
| 38 |
-
<body>
|
| 39 |
-
<h2>Forex Market Hours (Live)</h2>
|
| 40 |
-
<p id="localtime" style="text-align:center; margin-bottom:10px;"></p>
|
| 41 |
-
<table>
|
| 42 |
-
<thead>
|
| 43 |
-
<tr>
|
| 44 |
-
<th>Center</th>
|
| 45 |
-
<th>Status</th>
|
| 46 |
-
<th>Time Left</th>
|
| 47 |
-
<th>Start (UTC)</th>
|
| 48 |
-
<th>End (UTC)</th>
|
| 49 |
-
</tr>
|
| 50 |
-
</thead>
|
| 51 |
-
<tbody id="session-table">
|
| 52 |
-
</tbody>
|
| 53 |
-
</table>
|
| 54 |
-
|
| 55 |
-
<script>
|
| 56 |
-
const sessions = [
|
| 57 |
-
{center: "Sydney", start: 22, end: 6},
|
| 58 |
-
{center: "Tokyo", start: 0, end: 8},
|
| 59 |
-
{center: "London", start: 7, end: 15},
|
| 60 |
-
{center: "New York", start: 13, end: 20} // FIX: New York đúng là 13h-20h UTC (tức 6:00 AM - 1:00 PM PT)
|
| 61 |
-
];
|
| 62 |
-
|
| 63 |
-
function updateTable() {
|
| 64 |
-
const now = new Date();
|
| 65 |
-
const nowUTC = new Date(now.getTime() + now.getTimezoneOffset() * 60000);
|
| 66 |
-
document.getElementById("localtime").innerHTML = "Local Time: <b>" + now.toLocaleTimeString() + "</b>";
|
| 67 |
-
|
| 68 |
-
const table = document.getElementById("session-table");
|
| 69 |
-
table.innerHTML = "";
|
| 70 |
-
|
| 71 |
-
sessions.forEach(s => {
|
| 72 |
-
let start = new Date(nowUTC);
|
| 73 |
-
let end = new Date(nowUTC);
|
| 74 |
-
start.setUTCHours(s.start, 0, 0, 0);
|
| 75 |
-
end.setUTCHours(s.end, 0, 0, 0);
|
| 76 |
-
|
| 77 |
-
if (s.end <= s.start) end.setUTCDate(end.getUTCDate() + 1);
|
| 78 |
-
|
| 79 |
-
const isOpen = nowUTC >= start && nowUTC < end;
|
| 80 |
-
const timeLeft = isOpen ? new Date(end - nowUTC).toISOString().substr(11, 8) : "-";
|
| 81 |
-
const statusColor = isOpen ? "#00cc66" : "#999";
|
| 82 |
-
|
| 83 |
-
table.innerHTML += `
|
| 84 |
-
<tr>
|
| 85 |
-
<td>${s.center}</td>
|
| 86 |
-
<td style="color:${statusColor}; font-weight:bold;">${isOpen ? "Open" : "Closed"}</td>
|
| 87 |
-
<td>${timeLeft}</td>
|
| 88 |
-
<td>${String(s.start).padStart(2, '0')}:00</td>
|
| 89 |
-
<td>${String(s.end).padStart(2, '0')}:00</td>
|
| 90 |
-
</tr>
|
| 91 |
-
`;
|
| 92 |
-
});
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
updateTable();
|
| 96 |
-
setInterval(updateTable, 1000);
|
| 97 |
-
</script>
|
| 98 |
-
</body>
|
| 99 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|