Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Style.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ h3 {
text-align: center;
margin: auto;
color: white;
padding-top: 10px;
}
.faq {
color: #ececec;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h1>
</div>

<div>
<h3>INDIA(local time zone)</h3>
<h3 id="country">INDIA(local time zone)</h3>
<br />
<img
class="flag"
Expand Down
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var nd = new Date();

function showTime() {
d = new Date(); //Getting the local date object

Expand Down Expand Up @@ -43,6 +45,7 @@ function showTime() {
res[1] = ans.join(":");

document.getElementById("clock").innerHTML = res[1] + " " + session;
document.getElementById("country").innerHTML = checkDropdown;
setTimeout(showTime, 1000);
}
showTime();
Expand All @@ -54,7 +57,7 @@ const minuteHand = document.querySelector("[data-minute-hand]");
const secondHand = document.querySelector("[data-second-hand]");

function setClock() {
const currentDate = new Date();
const currentDate = nd;
const secondsRatio = currentDate.getSeconds() / 60;
const minutesRatio = (secondsRatio + currentDate.getMinutes()) / 60;
const hoursRatio = (minutesRatio + currentDate.getHours()) / 12;
Expand Down