From e9555247d4bbffe2cc7e0c57123c93c894d3c9ce Mon Sep 17 00:00:00 2001 From: www-data Date: Tue, 16 Dec 2014 17:28:43 +0100 Subject: [PATCH] Printing of dates improved. --- public_html/prova.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public_html/prova.js b/public_html/prova.js index 067eb72..41d3fa7 100755 --- a/public_html/prova.js +++ b/public_html/prova.js @@ -31,7 +31,9 @@ function update(event) var id_i=id+j; var tmpel=''; var date= new Date(item.risultati[j].time*1000/1000); - var data_ora=date.getDate()+"/"+date.getMonth()+"/"+date.getFullYear()+"\t"+date.getHours()+":"+date.getMinutes(); + var options = new Object(); + options.hour12=false; + var data_ora=date.toLocaleString('en-us',options); $("#tabella").append($('').attr('id',id_i)); id_i="#"+id_i; $(id_i).append($('').text(item.esercizio)); @@ -80,7 +82,9 @@ function updateUsr(event) var id_i=id+j; var tmpel=''; var date= new Date(item.risultati[j].time*1000/1000); - var data_ora=date.getDate()+"/"+date.getMonth()+"/"+date.getFullYear()+"\t"+date.getHours()+":"+date.getMinutes(); + var options = new Object(); + options.hour12=false; + var data_ora=date.toLocaleString('en-us',options); $("#tab").append($('').attr('id',id_i)); id_i="#"+id_i; $(id_i).append($('').text(item.risultati[j].utente)); -- 2.39.2