Skip to content

Commit 7672ee4

Browse files
committed
added basic difference in timezone system
1 parent 7fb870c commit 7672ee4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

client/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ nowFetch().then(response => {
132132
const cookiePhrase = `The cookie I stored to itentify you: ${res.cookie}.`;
133133
document.querySelector('.cookie').textContent = cookiePhrase;
134134
})
135+
const date = Date.now()
136+
console.log(date)
135137
const vpnData = {timezone: data.timezone}
138+
console.log(vpnData)
136139
ifVpn(vpnData).then(res => { console.log(res) })
137140
})

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ app.get('/', async (req, res) => {
2222
const agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36';
2323

2424
// const url = "https://api.ip8.com/ip/lookup/"+ip;
25-
const url = "https://api.ip8.com/ip/lookup/223.238.97.18";
25+
const url = "https://api.ip8.com/ip/lookup/176.10.112.40";
2626

2727
await Axios.get(url, {
2828
headers: {
@@ -66,7 +66,8 @@ app.get('/generate/:data', async (req, res) => { // Because URL PARAMS ARE CO
6666
})
6767

6868
app.get('/if-vpn/:data', async(req, res) => {
69-
const data = atob(req.params.data)
69+
const data = JSON.parse(atob(req.params.data))
70+
console.log(data)
7071
// Timezone Stuff
7172
let options = {
7273
timeZone: data.timezone,
@@ -80,7 +81,8 @@ app.get('/if-vpn/:data', async(req, res) => {
8081
formatter = new Intl.DateTimeFormat([], options);
8182
const stringTime = formatter.format(new Date());
8283
const IPtime = Date.parse(stringTime)
83-
console.log(time)
84+
console.log(IPtime)
85+
console.log(stringTime)
8486
return res.json({message: "yay i work"})
8587
})
8688

0 commit comments

Comments
 (0)