Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8031
| From | M_M <spam@the.hell> |
|---|---|
| Newsgroups | it.comp.lang.javascript |
| Subject | Re: date server |
| Date | 2016-04-29 19:25 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ng057n$rg2$1@dont-email.me> (permalink) |
| References | <nfvfe9$4bm$1@dont-email.me> <doh51iF3cc2U1@mid.individual.net> <nfvtfa$qg7$1@dont-email.me> |
ven, 29 apr 2016, 17:12:57, M_M ha scritto:
> Provero` ad adottare un'altra strategia cioe` convertire, con
> javascript, l'ora effettiva del client in quella corrispondente di Roma.
mah! scopiazzando qua e la`, come al mio solito, forse ci sono riuscito,
ma bisognerebbe essere all'estero per verificare del tutto ... :-/
Poi c'e` ancora il discorso dell'ora solare / ora legale, che non mi
ricordo mai quando cadono, ma adesso sono stanco e per ora, se
funzionasse veramente, andrebbe gia` bene cosi`.
<html>
<head>
<script type="text/javascript">
<!--
function updateClock() {
var d = new Date();
utc = d.getTime() + (d.getTimezoneOffset() * 60000);
nd = new Date(utc + (3600000*2));
currentRomeTime = nd.toLocaleString();
document.getElementById("clock").firstChild.nodeValue = currentRomeTime;
}
-->
</script>
</head>
<body onload="updateClock(); setInterval('updateClock()', 1000 )">
<span id="clock"> </span>
</body>
</html>
Back to it.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
date server M_M <spam@the.hell> - 2016-04-29 13:13 +0200
Re: date server Alessandro Pellizzari <shuriken@amiran.it> - 2016-04-29 14:14 +0100
Re: date server M_M <spam@the.hell> - 2016-04-29 17:12 +0200
Re: date server M_M <spam@the.hell> - 2016-04-29 19:25 +0200
Re: date server M_M <spam@the.hell> - 2016-04-30 09:26 +0200
Re: date server M_M <spam@the.hell> - 2016-05-03 14:15 +0200
Re: date server Alex <tommaso5ita@yahoo.it> - 2016-04-29 16:57 +0200
csiph-web