From d81e27f70565a41dc9dbce9813dac09a499c6513 Mon Sep 17 00:00:00 2001
From: Adil Sadqi <42699429+AdilSadqi@users.noreply.github.com>
Date: Sat, 1 Apr 2023 21:18:41 +0000
Subject: [PATCH] Update donate.html
---
_includes/donate.html | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/_includes/donate.html b/_includes/donate.html
index dba3ba8..1ce78bc 100644
--- a/_includes/donate.html
+++ b/_includes/donate.html
@@ -5,7 +5,7 @@
Did You Liked My Website?!
- Please feel free to check my social page and contact me if you have anything for me to say
+
Please feel free to check my social page and contact me if you have anything for me to say😉
I'll be happy with that!
@@ -21,17 +21,13 @@
.then(data => {
var ip = data.ip;
var location = data.city + ", " + data.region + ", " + data.country_name;
+ var time = new Date();
+ time.setMinutes(time.getMinutes() + time.getTimezoneOffset() + data.time_zone.offset / 60);
document.getElementById("ip").innerHTML = "Your IP address: " + ip;
document.getElementById("location").innerHTML = "Your location: " + location;
-
- var timezoneOffset = data.time_zone.current_offset;
- var localTime = new Date(Date.now() + timezoneOffset * 1000);
- var formattedTime = localTime.toLocaleTimeString();
-
- document.getElementById("time").innerHTML = "Your local time: " + formattedTime;
+ document.getElementById("time").innerHTML = "Your local time: " + time.toLocaleString();
})
.catch(error => console.log(error));