Added a CSS file to allow proper formatting of the date and time line.

This commit is contained in:
20xd6
2020-04-11 13:15:37 -04:00
parent ed4652ace1
commit c7a0849ef5
3 changed files with 8 additions and 12 deletions

View File

@@ -13,10 +13,7 @@ function startInterval(){
*/
function startTime(){
var current_time = new Date(),
our_tz = current_time.getTimezoneOffset,
formated_time = current_time.getHours() + ":"
+ current_time.getMinutes() + ":"
+ current_time.getSeconds();
our_tz = current_time.getTimezoneOffset;
document.getElementById('time_title').innerHTML = "Time is: "
+ current_time.toLocaleString('en-US',
{timeZone: current_tz,
@@ -26,7 +23,6 @@ function startTime(){
minute:'2-digit',
second:'2-digit',
timeZoneName:'short'});
//document.getElementById('time_title').innerHTML = current_tz;
document.getElementById('time_body').innerHTML = current_time.toLocaleString('en-EN' ,{
timeZone: current_tz,
dateStyle:'long',
@@ -38,7 +34,6 @@ function startTime(){
hour:'2-digit',
minute:'2-digit',
second:'2-digit',
timeZoneName:'short'})
+ " " + current_time.getTimezoneOffset();
timeZoneName:'short'});
document.getElementById('JStz').innerHTML = current_tz;
}