Clock 2.0

Second version (Updated)
4913 downloads, 22919 views

Download (12.02 KB)


You need to login to post a comment.

user ky3mu4
ky3mu4 7 years ago

ok. i find the solution:
make little changes in a script:

var hourPart = now.getUTCHours();
var minutesPart = now.getUTCMinutes();
var secondsPart = now.getUTCSeconds();

if (now.getUTCHours() > 11){
// hourPart = hourPart - 12;
if (now.getUTCHours() == 0){
// hourPart = 12;

and so on. it will give you Universal Coordinated Time (sometimes called 'Zulu' time but usually shortened to UTC). This is the modern equivalent of Greenwich Mean Time (GMT)...

and all, that you may need is to make adjustment of a time zone shift...

user ky3mu4
ky3mu4 7 years ago

yummy! but still don't understand: i have 4 in a row. in a different time zones.. ok, i use +1, +2 etc. but i make this calculations for my local time in city#1, and if person will look on it in the city#2, he will se a mistake in 1 hour (for +1 for city#2)... so, good idea will be add a line to take time from a network and not from a local machine...

user ankur
ankur 8 years ago

wow great work..............

user maxxis
maxxis 10 years ago

e11world. To adjust the time zones you can simply add +1 +2 +3 etc to the line that reads. var hourPart = now.getHours() ;

or - if needed.

This won't help with DST but that can be coded in if needed.

Im busy with this so I might upload if I succeed.

user e11world
e11world 10 years ago

really nice clock and i love the shadows too..
Just wondering. This clcok works on the computer time at the moment. How can I change it to work for someone who's in Italy (Imagine I have 2 clocks and I wanted Italy time and New York time and if I live in Russia, I would see the 2 different times and not my time there)??

show all 6 comments