From 95ad27846a159aee5e0924b6873a626656b10077 Mon Sep 17 00:00:00 2001
From: 20xd6 <20xd6@airmail.cc>
Date: Sun, 9 May 2021 15:28:56 -0400
Subject: [PATCH] Add second timestamp copy button.
When two timezones are displayed there is now a button to copy each of
the timestamps.
---
clock.js | 4 ++--
clock.php | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/clock.js b/clock.js
index 08e8c08..73f4949 100644
--- a/clock.js
+++ b/clock.js
@@ -47,8 +47,8 @@ function startTime(){
//document.getElementById('JStz').innerHTML = current_tz;
}
-function copy_timestamp() {
- var copyText = document.getElementById("time_body").innerText;
+function copy_timestamp(to_copy) {
+ var copyText = document.getElementById(to_copy).innerText;
var temp_element = document.createElement("textarea");
document.body.appendChild(temp_element)
temp_element.value = copyText;
diff --git a/clock.php b/clock.php
index 48af5f7..687dd6f 100644
--- a/clock.php
+++ b/clock.php
@@ -48,13 +48,13 @@
" ".
date("D, M d, Y, H:i:s") .
- " GMT". date("O T") ."
".
"
GMT". date("O T") ."
\n\t\t"; if($_POST['originalTZ']){// if the user want display the browser detected timezone as well as the selected one. date_default_timezone_set($originalTZ); echo''. date("D, M d, Y, H:i:s") . - "
GMT". date("O T") .'
'; + "GMT". date("O T") ."
"; date_default_timezone_set($scriptTZ); } if($_POST['displayOffset']){