Merge pull request 'Merge change in prod into master branch.' (#6) from prod into master
Reviewed-on: #6
This commit is contained in:
commit
dbad2b51a4
11
clock.js
11
clock.js
@ -46,3 +46,14 @@ function startTime(){
|
|||||||
}
|
}
|
||||||
//document.getElementById('JStz').innerHTML = current_tz;
|
//document.getElementById('JStz').innerHTML = current_tz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function copy_timestamp() {
|
||||||
|
var copyText = document.getElementById("time_body").innerText;
|
||||||
|
var temp_element = document.createElement("textarea");
|
||||||
|
document.body.appendChild(temp_element)
|
||||||
|
temp_element.value = copyText;
|
||||||
|
temp_element.select();
|
||||||
|
temp_element.setSelectionRange(0,999);
|
||||||
|
document.execCommand("copy");
|
||||||
|
document.body.removeChild(temp_element);
|
||||||
|
}
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
"<br><span>".
|
"<br><span>".
|
||||||
"<p id='time_body'>".
|
"<p id='time_body'>".
|
||||||
date("D, M d, Y, H:i:s") .
|
date("D, M d, Y, H:i:s") .
|
||||||
"</p><p> GMT". date("O T") ."</p>\n\t\t</span>";
|
"</p><p> GMT". date("O T") ."</p><button onclick='copy_timestamp()'>Copy Timestamp</button>\n\t\t</span>";
|
||||||
if($_POST['originalTZ']){// if the user want display the browser detected timezone as well as the selected one.
|
if($_POST['originalTZ']){// if the user want display the browser detected timezone as well as the selected one.
|
||||||
date_default_timezone_set($originalTZ);
|
date_default_timezone_set($originalTZ);
|
||||||
echo'<h3>Time in original Timezone</h3>'.
|
echo'<h3>Time in original Timezone</h3>'.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user